repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/features/mod.rs | src/features/mod.rs | use std::collections::HashMap;
use crate::cli;
use crate::git_config::GitConfig;
use crate::options::option_value::ProvenancedOptionValue;
use ProvenancedOptionValue::*;
/// A custom feature is a named set of command line (option, value) pairs, supplied in a git config
/// file. I.e. it might look like
///
/// [delta... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/features/diff_highlight.rs | src/features/diff_highlight.rs | use crate::features::raw;
use crate::features::OptionValueFunction;
pub fn make_feature() -> Vec<(String, OptionValueFunction)> {
_make_feature(false)
}
pub fn _make_feature(bold: bool) -> Vec<(String, OptionValueFunction)> {
let mut feature = raw::make_feature();
feature.retain(|(s, _)| s != "keep-plus-m... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/features/navigate.rs | src/features/navigate.rs | use std::io::Write;
#[cfg(target_os = "windows")]
use std::io::{Error, ErrorKind};
use std::path::PathBuf;
use crate::features::OptionValueFunction;
use crate::utils::bat::output::PagerCfg;
pub fn make_feature() -> Vec<(String, OptionValueFunction)> {
builtin_feature!([
(
"navigate",
... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/parse_ansi.rs | src/subcommands/parse_ansi.rs | use std::io::{self, BufRead};
#[cfg(not(tarpaulin_include))]
pub fn parse_ansi() -> std::io::Result<()> {
use crate::ansi;
for line in io::stdin().lock().lines() {
println!(
"{}",
ansi::explain_ansi(
&line.unwrap_or_else(|line| panic!("Invalid utf-8: {:?}", line... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/external.rs | src/subcommands/external.rs | use crate::cli::Opt;
use clap::CommandFactory;
use clap::{ArgMatches, Error};
use std::ffi::{OsStr, OsString};
const RG: &str = "rg";
const GIT: &str = "git";
pub const SUBCOMMANDS: &[&str] = &[RG, GIT];
#[derive(PartialEq)]
pub enum SubCmdKind {
Git(Option<String>), // Some(subcommand) if a git subcommand (git s... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/diff.rs | src/subcommands/diff.rs | use std::path::Path;
use crate::config::{self};
use crate::utils::git::retrieve_git_version;
use crate::subcommands::{SubCmdKind, SubCommand};
use std::ffi::OsString;
/// Build `git diff` command for the files provided on the command line. Fall back to
/// `diff` if the supplied "files" use process substitution.
pu... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/generate_completion.rs | src/subcommands/generate_completion.rs | use clap::CommandFactory;
use clap_complete::{generate, Shell};
use crate::cli;
pub fn generate_completion_file(shell: Shell) -> std::io::Result<()> {
let mut cmd = cli::Opt::command();
let bin_name = cmd.get_bin_name().unwrap_or(cmd.get_name()).to_string();
generate(shell, &mut cmd, bin_name, &mut std::i... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/show_syntax_themes.rs | src/subcommands/show_syntax_themes.rs | use crate::cli;
use crate::color::{ColorMode, ColorMode::*};
use crate::config;
use crate::delta;
use crate::env::DeltaEnv;
use crate::options::theme::color_mode_from_syntax_theme;
use crate::utils;
use crate::utils::bat::output::{OutputType, PagingMode};
use clap::Parser;
use std::io::{self, ErrorKind, IsTerminal, Rea... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/show_colors.rs | src/subcommands/show_colors.rs | use crate::cli;
use crate::color;
use crate::colors;
use crate::config;
use crate::delta;
use crate::env::DeltaEnv;
use crate::paint;
use crate::paint::BgShouldFill;
use crate::style;
use crate::utils::bat::output::{OutputType, PagingMode};
#[cfg(not(tarpaulin_include))]
pub fn show_colors() -> std::io::Result<()> {
... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/list_syntax_themes.rs | src/subcommands/list_syntax_themes.rs | use std::io::{self, IsTerminal, Write};
use itertools::Itertools;
use crate::{options::theme::is_light_syntax_theme, utils};
#[cfg(not(tarpaulin_include))]
pub fn list_syntax_themes() -> std::io::Result<()> {
let stdout = io::stdout();
let mut stdout = stdout.lock();
if stdout.is_terminal() {
_li... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/mod.rs | src/subcommands/mod.rs | // internal subcommands:
pub mod generate_completion;
pub mod list_syntax_themes;
pub mod parse_ansi;
mod sample_diff;
pub mod show_colors;
pub mod show_config;
pub mod show_syntax_themes;
pub mod show_themes;
// start external processes, e.g. `git diff` or `rg`, output is read by delta
pub mod diff;
mod external;
pub... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/sample_diff.rs | src/subcommands/sample_diff.rs | pub const DIFF: &[u8] = r#"
commit 7ec4627902020cccd7b3f4fbc63e1b0d6b9798cd
Author: Evan You <yyx990803@gmail.com>
Date: Thu Feb 21 08:52:15 2019 -0500
fix: ensure generated scoped slot code is compatible with 2.5
fix #9545
diff --git a/src/compiler/codegen/index.js b/src/compiler/codegen/index.js
inde... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/show_config.rs | src/subcommands/show_config.rs | use std::io::Write;
use itertools::Itertools;
use crate::cli;
use crate::config;
use crate::features::side_by_side::{Left, Right};
use crate::minusplus::*;
use crate::paint::BgFillMethod;
use crate::style;
use crate::utils::bat::output::PagingMode;
pub fn show_config(config: &config::Config, writer: &mut dyn Write) ... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/subcommands/show_themes.rs | src/subcommands/show_themes.rs | use std::io::{self, ErrorKind, IsTerminal, Read};
use crate::cli;
use crate::color::ColorMode;
use crate::config;
use crate::delta;
use crate::env::DeltaEnv;
use crate::git_config;
use crate::options::get::get_themes;
use crate::utils::bat::output::{OutputType, PagingMode};
pub fn show_themes(dark: bool, light: bool,... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/blame.rs | src/handlers/blame.rs | use chrono::{DateTime, FixedOffset};
use lazy_static::lazy_static;
use regex::Regex;
use std::borrow::Cow;
use unicode_width::UnicodeWidthStr;
use crate::ansi::measure_text_width;
use crate::color;
use crate::config;
use crate::config::delta_unreachable;
use crate::delta::{self, State, StateMachine};
use crate::fatal;... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/draw.rs | src/handlers/draw.rs | use std::cmp::max;
use std::io::Write;
use crate::ansi;
use crate::cli::Width;
use crate::style::{DecorationStyle, Style};
fn paint_text(text_style: Style, text: &str, addendum: &str) -> String {
if addendum.is_empty() {
text_style.paint(text).to_string()
} else {
text_style
.paint... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/git_show_file.rs | src/handlers/git_show_file.rs | use crate::delta::{State, StateMachine};
use crate::paint::{BgShouldFill, StyleSectionSpecifier};
use crate::utils::process;
impl StateMachine<'_> {
// If this is a line of `git show $revision:/path/to/file.ext` output then
// syntax-highlight it as language `ext`.
pub fn handle_git_show_file_line(&mut sel... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/merge_conflict.rs | src/handlers/merge_conflict.rs | use std::ops::{Index, IndexMut};
use itertools::Itertools;
use unicode_segmentation::UnicodeSegmentation;
use super::draw;
use crate::cli;
use crate::config::{self, delta_unreachable};
use crate::delta::{DiffType, InMergeConflict, MergeParents, State, StateMachine};
use crate::minusplus::MinusPlus;
use crate::paint::... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | true |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/diff_header.rs | src/handlers/diff_header.rs | use std::borrow::Cow;
use std::path::Path;
use unicode_segmentation::UnicodeSegmentation;
use super::draw;
use crate::config::Config;
use crate::delta::{DiffType, Source, State, StateMachine};
use crate::paint::Painter;
use crate::{features, utils};
// https://git-scm.com/docs/git-config#Documentation/git-config.txt... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | true |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/submodule.rs | src/handlers/submodule.rs | use lazy_static::lazy_static;
use regex::Regex;
use crate::delta::{State, StateMachine};
impl StateMachine<'_> {
#[inline]
fn test_submodule_log(&self) -> bool {
self.line.starts_with("Submodule ")
}
pub fn handle_submodule_log_line(&mut self) -> std::io::Result<bool> {
if !self.test_... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/commit_meta.rs | src/handlers/commit_meta.rs | use std::borrow::Cow;
use super::draw;
use crate::delta::{State, StateMachine};
use crate::features;
impl StateMachine<'_> {
#[inline]
fn test_commit_meta_header_line(&self) -> bool {
self.config.commit_regex.is_match(&self.line)
}
pub fn handle_commit_meta_header_line(&mut self) -> std::io::... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/hunk.rs | src/handlers/hunk.rs | use std::cmp::min;
use lazy_static::lazy_static;
use crate::cli;
use crate::config::{delta_unreachable, Config};
use crate::delta::{DiffType, InMergeConflict, MergeParents, State, StateMachine};
use crate::paint::{prepare, prepare_raw_line};
use crate::style;
use crate::utils::process::{self, CallingProcess};
use cra... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/diff_stat.rs | src/handlers/diff_stat.rs | use lazy_static::lazy_static;
use regex::Regex;
use std::borrow::Cow;
use crate::config::Config;
use crate::delta::{State, StateMachine};
use crate::features;
use crate::utils;
impl StateMachine<'_> {
#[inline]
fn test_diff_stat_line(&self) -> bool {
(self.state == State::CommitMeta || self.state == S... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/diff_header_diff.rs | src/handlers/diff_header_diff.rs | use crate::delta::{DiffType, InMergeConflict, MergeParents, State, StateMachine};
use crate::handlers::diff_header::{get_repeated_file_path_from_diff_line, FileEvent};
impl StateMachine<'_> {
#[inline]
fn test_diff_header_diff_line(&self) -> bool {
self.line.starts_with("diff ")
}
#[allow(clip... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/mod.rs | src/handlers/mod.rs | /// This module contains functions handling input lines encountered during the
/// main `StateMachine::consume()` loop.
pub mod blame;
pub mod commit_meta;
pub mod diff_header;
pub mod diff_header_diff;
pub mod diff_header_misc;
pub mod diff_stat;
pub mod draw;
pub mod git_show_file;
pub mod grep;
pub mod hunk;
pub mod... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/hunk_header.rs | src/handlers/hunk_header.rs | // A module for constructing and writing the hunk header.
//
// The structure of the hunk header output by delta is
// ```
// (file):(line-number): (code-fragment)
// ```
//
// The code fragment and line number derive from a line of git/diff output that looks like
// ```
// @@ -119,12 +119,7 @@ fn write_to_output_buffe... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/diff_header_misc.rs | src/handlers/diff_header_misc.rs | use crate::delta::{DiffType, Source, State, StateMachine};
use crate::utils::path::relativize_path_maybe;
impl StateMachine<'_> {
#[inline]
fn test_diff_file_missing(&self) -> bool {
self.source == Source::DiffUnified && self.line.starts_with("Only in ")
}
#[inline]
fn test_diff_is_binary(... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/grep.rs | src/handlers/grep.rs | use std::borrow::Cow;
use lazy_static::lazy_static;
use regex::Regex;
use serde::Deserialize;
use crate::ansi;
use crate::config::{
delta_unreachable, GrepType, HunkHeaderIncludeCodeFragment, HunkHeaderIncludeFilePath,
HunkHeaderIncludeLineNumber,
};
use crate::delta::{State, StateMachine};
use crate::handler... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | true |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/handlers/ripgrep_json.rs | src/handlers/ripgrep_json.rs | // See https://github.com/BurntSushi/ripgrep
// This module implements handling of `rg --json` output. It is called by the
// handler in handlers/grep.rs. Normal rg output (i.e. without --json) is
// handled by the same code paths as `git grep` etc output, in handlers/grep.rs.
use std::borrow::Cow;
use crate::handlers... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/git_config/remote.rs | src/git_config/remote.rs | use std::result::Result;
use std::str::FromStr;
use lazy_static::lazy_static;
use regex::Regex;
use crate::errors::*;
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum GitRemoteRepo {
GitHub { slug: String },
GitLab { slug: String },
SourceHut { slug: String },
Codeberg { slug: String },
}
impl GitRem... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
dandavison/delta | https://github.com/dandavison/delta/blob/acd758f7a08df6c2ac5542a2c5a4034c664a9ed8/src/git_config/mod.rs | src/git_config/mod.rs | mod remote;
pub use remote::GitRemoteRepo;
use crate::env::DeltaEnv;
use regex::Regex;
use std::cell::OnceCell;
use std::collections::HashMap;
use std::path::Path;
use lazy_static::lazy_static;
pub struct GitConfig {
config: git2::Config,
config_from_env_var: HashMap<String, String>,
pub enabled: bool,
... | rust | MIT | acd758f7a08df6c2ac5542a2c5a4034c664a9ed8 | 2026-01-04T15:34:43.859751Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/renderer/src/lib.rs | renderer/src/lib.rs | //! The official renderer for iced.
#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(feature = "wgpu-bare")]
pub use iced_wgpu as wgpu;
pub mod fallback;
pub use iced_graphics as graphics;
pub use iced_graphics::core;
#[cfg(feature = "geometry")]
pub use iced_graphics::geometry;
/// The default graphics renderer for [... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/renderer/src/fallback.rs | renderer/src/fallback.rs | //! Compose existing renderers and create type-safe fallback strategies.
use crate::core::image;
use crate::core::renderer;
use crate::core::svg;
use crate::core::{
self, Background, Color, Font, Image, Pixels, Point, Rectangle, Size, Svg, Transformation,
};
use crate::graphics::compositor;
use crate::graphics::mes... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/devtools/src/lib.rs | devtools/src/lib.rs | #![allow(missing_docs)]
use iced_debug as debug;
use iced_program as program;
use iced_program::runtime;
use iced_program::runtime::futures;
use iced_widget as widget;
use iced_widget::core;
mod comet;
mod time_machine;
use crate::core::border;
use crate::core::keyboard;
use crate::core::theme::{self, Theme};
use cra... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/devtools/src/time_machine.rs | devtools/src/time_machine.rs | use crate::Program;
#[cfg(feature = "time-travel")]
pub struct TimeMachine<P>
where
P: Program,
{
state: Option<P::State>,
messages: Vec<P::Message>,
}
#[cfg(feature = "time-travel")]
impl<P> TimeMachine<P>
where
P: Program,
P::Message: Clone,
{
pub fn new() -> Self {
Self {
... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/devtools/src/comet.rs | devtools/src/comet.rs | use crate::runtime::task::{self, Task};
use std::process;
pub const COMPATIBLE_REVISION: &str = "3f75f3240edc1719df584810337bc7df010327d8";
pub fn launch() -> Task<launch::Result> {
task::try_blocking(|mut sender| {
let cargo_install = process::Command::new("cargo")
.args(["install", "--list"... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/settings.rs | tiny_skia/src/settings.rs | use crate::core::{Font, Pixels};
use crate::graphics;
/// The settings of a [`Compositor`].
///
/// [`Compositor`]: crate::window::Compositor
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Settings {
/// The default [`Font`] to use.
pub default_font: Font,
/// The default size of text.
///
//... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/engine.rs | tiny_skia/src/engine.rs | use crate::Primitive;
use crate::core::renderer::Quad;
use crate::core::{Background, Color, Gradient, Rectangle, Size, Transformation, Vector};
use crate::graphics::{Image, Text};
use crate::text;
#[derive(Debug)]
pub struct Engine {
text_pipeline: text::Pipeline,
#[cfg(feature = "image")]
pub(crate) rast... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/lib.rs | tiny_skia/src/lib.rs | #![allow(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod window;
mod engine;
mod layer;
mod primitive;
mod settings;
mod text;
#[cfg(feature = "image")]
mod raster;
#[cfg(feature = "svg")]
mod vector;
#[cfg(feature = "geometry")]
pub mod geometry;
use iced_debug as debug;
pub use iced_graphics as gra... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/vector.rs | tiny_skia/src/vector.rs | use crate::core::svg::{Data, Handle};
use crate::core::{Color, Rectangle, Size};
use resvg::usvg;
use rustc_hash::{FxHashMap, FxHashSet};
use tiny_skia::Transform;
use std::cell::RefCell;
use std::collections::hash_map;
use std::fs;
use std::panic;
use std::sync::Arc;
#[derive(Debug)]
pub struct Pipeline {
cache... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/geometry.rs | tiny_skia/src/geometry.rs | use crate::Primitive;
use crate::core::text::LineHeight;
use crate::core::{self, Pixels, Point, Radians, Rectangle, Size, Svg, Vector};
use crate::graphics::cache::{self, Cached};
use crate::graphics::geometry::fill::{self, Fill};
use crate::graphics::geometry::stroke::{self, Stroke};
use crate::graphics::geometry::{se... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/layer.rs | tiny_skia/src/layer.rs | use crate::Primitive;
use crate::core::renderer::Quad;
use crate::core::{self, Background, Color, Point, Rectangle, Svg, Transformation};
use crate::graphics::damage;
use crate::graphics::layer;
use crate::graphics::text::{Editor, Paragraph, Text};
use crate::graphics::{self, Image};
use std::sync::Arc;
pub type Stac... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/text.rs | tiny_skia/src/text.rs | use crate::core::alignment;
use crate::core::text::{Alignment, Shaping};
use crate::core::{Color, Font, Pixels, Point, Rectangle, Transformation};
use crate::graphics::text::cache::{self, Cache};
use crate::graphics::text::editor;
use crate::graphics::text::font_system;
use crate::graphics::text::paragraph;
use rustc_... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/primitive.rs | tiny_skia/src/primitive.rs | use crate::core::Rectangle;
#[derive(Debug, Clone, PartialEq)]
pub enum Primitive {
/// A path filled with some paint.
Fill {
/// The path to fill.
path: tiny_skia::Path,
/// The paint to use.
paint: tiny_skia::Paint<'static>,
/// The fill rule to follow.
rule: t... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/window.rs | tiny_skia/src/window.rs | pub mod compositor;
pub use compositor::{Compositor, Surface};
| rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/raster.rs | tiny_skia/src/raster.rs | use crate::core::image as raster;
use crate::core::{Rectangle, Size};
use crate::graphics;
use rustc_hash::{FxHashMap, FxHashSet};
use std::cell::RefCell;
use std::collections::hash_map;
#[derive(Debug)]
pub struct Pipeline {
cache: RefCell<Cache>,
}
impl Pipeline {
pub fn new() -> Self {
Self {
... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tiny_skia/src/window/compositor.rs | tiny_skia/src/window/compositor.rs | use crate::core::{Color, Rectangle, Size};
use crate::graphics::compositor::{self, Information};
use crate::graphics::damage;
use crate::graphics::error::{self, Error};
use crate::graphics::{self, Shell, Viewport};
use crate::{Layer, Renderer, Settings};
use std::collections::VecDeque;
use std::num::NonZeroU32;
pub s... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/beacon/src/stream.rs | beacon/src/stream.rs | use futures::Future;
use futures::channel::mpsc;
use futures::stream::{self, Stream, StreamExt};
pub fn channel<T, F>(f: impl Fn(mpsc::Sender<T>) -> F) -> impl Stream<Item = T>
where
F: Future<Output = ()>,
{
let (sender, receiver) = mpsc::channel(1);
stream::select(
receiver,
stream::once... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/beacon/src/lib.rs | beacon/src/lib.rs | pub use iced_core as core;
pub use semver::Version;
pub mod client;
pub mod span;
mod error;
mod stream;
pub use client::Client;
pub use span::Span;
use crate::core::theme;
use crate::core::time::{Duration, SystemTime};
use crate::error::Error;
use crate::span::present;
use futures::{SinkExt, Stream};
use tokio::i... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/beacon/src/client.rs | beacon/src/client.rs | use crate::Error;
use crate::core::time::{Duration, SystemTime};
use crate::span;
use crate::theme;
use semver::Version;
use serde::{Deserialize, Serialize};
use tokio::io::{self, AsyncReadExt, AsyncWriteExt};
use tokio::net;
use tokio::sync::{Mutex, mpsc};
use tokio::task;
use tokio::time;
use std::sync::Arc;
use st... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/beacon/src/error.rs | beacon/src/error.rs | use std::io;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("input/output operation failed: {0}")]
IOFailed(#[from] io::Error),
#[error("decoding failed: {0}")]
DecodingFailed(#[from] Box<bincode::ErrorKind>),
}
| rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/beacon/src/span.rs | beacon/src/span.rs | use crate::core::window;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum Span {
Boot,
Update {
number: usize,
message: String,
tasks: usize,
subscriptions: usize,
},
View {
window: window::Id,
},
... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/winit/src/lib.rs | winit/src/lib.rs | //! A windowing shell for Iced, on top of [`winit`].
//!
//! 
//!
//! `iced_winit` offers some convenient abstractions on top of [`iced_runtime`]
//! to quickstart devel... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | true |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/winit/src/clipboard.rs | winit/src/clipboard.rs | //! Access the clipboard.
use crate::core::clipboard::Kind;
use std::sync::Arc;
use winit::window::{Window, WindowId};
/// A buffer for short-term storage and transfer within and between
/// applications.
pub struct Clipboard {
state: State,
}
enum State {
Connected {
clipboard: window_clipboard::Cli... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/winit/src/error.rs | winit/src/error.rs | use crate::futures::futures;
use crate::graphics;
/// An error that occurred while running an application.
#[derive(Debug, thiserror::Error)]
pub enum Error {
/// The futures executor could not be created.
#[error("the futures executor could not be created")]
ExecutorCreationFailed(futures::io::Error),
... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/winit/src/conversion.rs | winit/src/conversion.rs | //! Convert [`winit`] types into [`iced_runtime`] types, and viceversa.
//!
//! [`winit`]: https://github.com/rust-windowing/winit
//! [`iced_runtime`]: https://github.com/iced-rs/iced/tree/master/runtime
use crate::core::input_method;
use crate::core::keyboard;
use crate::core::mouse;
use crate::core::theme;
use crate... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | true |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/winit/src/window.rs | winit/src/window.rs | mod state;
use state::State;
pub use crate::core::window::{Event, Id, RedrawRequest, Settings};
use crate::conversion;
use crate::core::alignment;
use crate::core::input_method;
use crate::core::mouse;
use crate::core::renderer;
use crate::core::text;
use crate::core::theme;
use crate::core::time::Instant;
use crate... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/winit/src/proxy.rs | winit/src/proxy.rs | use crate::futures::futures::{
Future, Sink, StreamExt,
channel::mpsc,
select,
task::{Context, Poll},
};
use crate::graphics::shell;
use crate::runtime::Action;
use crate::runtime::window;
use std::pin::Pin;
/// An event loop proxy with backpressure that implements `Sink`.
#[derive(Debug)]
pub struct P... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/winit/src/window/state.rs | winit/src/window/state.rs | use crate::conversion;
use crate::core::{Color, Size};
use crate::core::{mouse, theme, window};
use crate::graphics::Viewport;
use crate::program::{self, Program};
use winit::event::{Touch, WindowEvent};
use winit::window::Window;
use std::fmt::{Debug, Formatter};
/// The state of the window of a [`Program`].
pub st... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/program/src/lib.rs | program/src/lib.rs | //! The definition of an iced program.
pub use iced_graphics as graphics;
pub use iced_runtime as runtime;
pub use iced_runtime::core;
pub use iced_runtime::futures;
pub mod message;
mod preset;
pub use preset::Preset;
use crate::core::renderer;
use crate::core::text;
use crate::core::theme;
use crate::core::window... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/program/src/preset.rs | program/src/preset.rs | use crate::runtime::Task;
use std::borrow::Cow;
use std::fmt;
/// A specific boot strategy for a [`Program`](crate::Program).
pub struct Preset<State, Message> {
name: Cow<'static, str>,
boot: Box<dyn Fn() -> (State, Task<Message>)>,
}
impl<State, Message> Preset<State, Message> {
/// Creates a new [`Pre... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/program/src/message.rs | program/src/message.rs | //! Traits for the message type of a [`Program`](crate::Program).
/// A trait alias for [`Clone`], but only when the `time-travel`
/// feature is enabled.
#[cfg(feature = "time-travel")]
pub trait MaybeClone: Clone {}
#[cfg(feature = "time-travel")]
impl<T> MaybeClone for T where T: Clone {}
/// A trait alias for [`... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/viewport.rs | graphics/src/viewport.rs | use crate::core::{Size, Transformation};
/// A viewing region for displaying computer graphics.
#[derive(Debug, Clone)]
pub struct Viewport {
physical_size: Size<u32>,
logical_size: Size<f32>,
scale_factor: f32,
projection: Transformation,
}
impl Viewport {
/// Creates a new [`Viewport`] with the ... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/settings.rs | graphics/src/settings.rs | use crate::Antialiasing;
use crate::core::{self, Font, Pixels};
/// The settings of a renderer.
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Settings {
/// The default [`Font`] to use.
pub default_font: Font,
/// The default size of text.
///
/// By default, it will be set to `16.0`.
pu... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/lib.rs | graphics/src/lib.rs | //! A bunch of backend-agnostic types that can be leveraged to build a renderer
//! for [`iced`].
//!
//! 
//!
//! [`iced`]: https://github.com/iced-rs/iced
#![doc(
... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/image.rs | graphics/src/image.rs | //! Load and operate on images.
#[cfg(feature = "image")]
use crate::core::Bytes;
use crate::core::Rectangle;
use crate::core::image;
use crate::core::svg;
/// A raster or vector image.
#[allow(missing_docs)]
#[derive(Debug, Clone, PartialEq)]
pub enum Image {
/// A raster image.
Raster {
image: image... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry.rs | graphics/src/geometry.rs | //! Build and draw geometry.
pub mod fill;
pub mod frame;
pub mod path;
pub mod stroke;
mod cache;
mod style;
mod text;
pub use cache::Cache;
pub use fill::Fill;
pub use frame::Frame;
pub use path::Path;
pub use stroke::{LineCap, LineDash, LineJoin, Stroke};
pub use style::Style;
pub use text::Text;
pub use crate::c... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/shell.rs | graphics/src/shell.rs | //! Control the windowing runtime from a renderer.
use std::sync::Arc;
/// A windowing shell.
#[derive(Clone)]
pub struct Shell(Arc<dyn Notifier>);
impl Shell {
/// Creates a new [`Shell`].
pub fn new(notifier: impl Notifier) -> Self {
Self(Arc::new(notifier))
}
/// Creates a headless [`Shell... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/antialiasing.rs | graphics/src/antialiasing.rs | /// An antialiasing strategy.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Antialiasing {
/// Multisample AA with 2 samples
MSAAx2,
/// Multisample AA with 4 samples
MSAAx4,
/// Multisample AA with 8 samples
MSAAx8,
/// Multisample AA with 16 samples
MSAAx16,
}
impl Antialiasin... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/mesh.rs | graphics/src/mesh.rs | //! Draw triangles!
use crate::color;
use crate::core::{Rectangle, Transformation};
use crate::gradient;
use bytemuck::{Pod, Zeroable};
use std::sync::atomic::{self, AtomicU64};
use std::sync::{Arc, Weak};
/// A low-level primitive to render a mesh of triangles.
#[derive(Debug, Clone, PartialEq)]
pub enum Mesh {
... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/layer.rs | graphics/src/layer.rs | //! Draw and stack layers of graphical primitives.
use crate::core::{Rectangle, Transformation};
/// A layer of graphical primitives.
///
/// Layers normally dictate a set of primitives that are
/// rendered in a specific order.
pub trait Layer: Default {
/// Creates a new [`Layer`] with the given bounds.
fn w... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/text.rs | graphics/src/text.rs | //! Draw text.
pub mod cache;
pub mod editor;
pub mod paragraph;
pub use cache::Cache;
pub use editor::Editor;
pub use paragraph::Paragraph;
pub use cosmic_text;
use crate::core::alignment;
use crate::core::font::{self, Font};
use crate::core::text::{Alignment, Shaping, Wrapping};
use crate::core::{Color, Pixels, Po... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/error.rs | graphics/src/error.rs | //! See what can go wrong when creating graphical backends.
/// An error that occurred while creating an application's graphical context.
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum Error {
/// The requested backend version is not supported.
#[error("the requested backend version is not s... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/compositor.rs | graphics/src/compositor.rs | //! A compositor is responsible for initializing a renderer and managing window
//! surfaces.
use crate::core::Color;
use crate::futures::{MaybeSend, MaybeSync};
use crate::{Error, Settings, Shell, Viewport};
use raw_window_handle::{HasDisplayHandle, HasWindowHandle};
use thiserror::Error;
use std::borrow::Cow;
/// ... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/damage.rs | graphics/src/damage.rs | //! Compute the damage between frames.
use crate::core::{Point, Rectangle};
/// Diffs the damage regions given some previous and current primitives.
pub fn diff<T>(
previous: &[T],
current: &[T],
bounds: impl Fn(&T) -> Vec<Rectangle>,
diff: impl Fn(&T, &T) -> Vec<Rectangle>,
) -> Vec<Rectangle> {
l... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/color.rs | graphics/src/color.rs | //! Manage colors for shaders.
use crate::core::Color;
use bytemuck::{Pod, Zeroable};
/// A color packed as 4 floats representing RGBA channels.
#[derive(Debug, Clone, Copy, PartialEq, Zeroable, Pod)]
#[repr(C)]
pub struct Packed([f32; 4]);
impl Packed {
/// Returns the internal components of the [`Packed`] colo... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/cache.rs | graphics/src/cache.rs | //! Cache computations and efficiently reuse them.
use std::cell::RefCell;
use std::fmt;
use std::mem;
use std::sync::atomic::{self, AtomicU64};
/// A simple cache that stores generated values to avoid recomputation.
///
/// Keeps track of the last generated value after clearing.
pub struct Cache<T> {
group: Group... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/gradient.rs | graphics/src/gradient.rs | //! A gradient that can be used as a fill for some geometry.
//!
//! For a gradient that you can use as a background variant for a widget, see [`Gradient`].
use crate::color;
use crate::core::gradient::ColorStop;
use crate::core::{self, Color, Point, Rectangle};
use bytemuck::{Pod, Zeroable};
use half::f16;
use std::c... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/image/storage.rs | graphics/src/image/storage.rs | //! Store images.
use iced_core::Size;
use std::fmt::Debug;
/// Stores cached image data for use in rendering
pub trait Storage {
/// The type of an [`Entry`] in the [`Storage`].
type Entry: Entry;
/// State provided to upload or remove a [`Self::Entry`].
type State<'a>;
/// Upload the image dat... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry/stroke.rs | graphics/src/geometry/stroke.rs | //! Create lines from a [`Path`] and assigns them various attributes/styles.
//!
//! [`Path`]: super::Path
pub use crate::geometry::Style;
use iced_core::Color;
/// The style of a stroke.
#[derive(Debug, Clone, Copy)]
pub struct Stroke<'a> {
/// The color or gradient of the stroke.
///
/// By default, it ... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry/fill.rs | graphics/src/geometry/fill.rs | //! Fill [`Geometry`] with a certain style.
//!
//! [`Geometry`]: super::Renderer::Geometry
pub use crate::geometry::Style;
use crate::core::Color;
use crate::gradient::{self, Gradient};
/// The style used to fill geometry.
#[derive(Debug, Clone, Copy)]
pub struct Fill {
/// The color or gradient of the fill.
... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry/path.rs | graphics/src/geometry/path.rs | //! Build different kinds of 2D shapes.
pub mod arc;
mod builder;
#[doc(no_inline)]
pub use arc::Arc;
pub use builder::Builder;
pub use lyon_path;
use crate::core::border;
use crate::core::{Point, Size};
/// An immutable set of points that may or may not be connected.
///
/// A single [`Path`] can represent differ... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry/text.rs | graphics/src/geometry/text.rs | use crate::core;
use crate::core::alignment;
use crate::core::text::{Alignment, LineHeight, Paragraph, Shaping, Wrapping};
use crate::core::{Color, Font, Pixels, Point, Size, Vector};
use crate::geometry::Path;
use crate::text;
/// A bunch of text that can be drawn to a canvas
#[derive(Debug, Clone)]
pub struct Text {... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry/style.rs | graphics/src/geometry/style.rs | use crate::core::Color;
use crate::geometry::Gradient;
/// The coloring style of some drawing.
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Style {
/// A solid [`Color`].
Solid(Color),
/// A [`Gradient`] color.
Gradient(Gradient),
}
impl From<Color> for Style {
fn from(color: Color) -> Self ... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry/frame.rs | graphics/src/geometry/frame.rs | //! Draw and generate geometry.
use crate::core::{Point, Radians, Rectangle, Size, Vector};
use crate::geometry::{self, Fill, Image, Path, Stroke, Svg, Text};
/// The region of a surface that can be used to draw geometry.
pub struct Frame<Renderer>
where
Renderer: geometry::Renderer,
{
raw: Renderer::Frame,
}
... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry/cache.rs | graphics/src/geometry/cache.rs | use crate::cache::{self, Cached};
use crate::core::{Rectangle, Size};
use crate::geometry::{self, Frame};
pub use cache::Group;
/// A simple cache that stores generated geometry to avoid recomputation.
///
/// A [`Cache`] will not redraw its geometry unless the dimensions of its layer
/// change or it is explicitly c... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry/path/builder.rs | graphics/src/geometry/path/builder.rs | use crate::geometry::path::{Arc, Path, arc};
use crate::core::border;
use crate::core::{Point, Radians, Size};
use lyon_path::builder::{self, SvgPathBuilder};
use lyon_path::geom;
use lyon_path::math;
/// A [`Path`] builder.
///
/// Once a [`Path`] is built, it can no longer be mutated.
pub struct Builder {
raw:... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/geometry/path/arc.rs | graphics/src/geometry/path/arc.rs | //! Build and draw curves.
use iced_core::{Point, Radians, Vector};
/// A segment of a differentiable curve.
#[derive(Debug, Clone, Copy)]
pub struct Arc {
/// The center of the arc.
pub center: Point,
/// The radius of the arc.
pub radius: f32,
/// The start of the segment's angle, clockwise rotat... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/text/editor.rs | graphics/src/text/editor.rs | //! Draw and edit text.
use crate::core::text::editor::{
self, Action, Cursor, Direction, Edit, Motion, Position, Selection,
};
use crate::core::text::highlighter::{self, Highlighter};
use crate::core::text::{LineHeight, Wrapping};
use crate::core::{Font, Pixels, Point, Rectangle, Size};
use crate::text;
use cosmi... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/text/cache.rs | graphics/src/text/cache.rs | //! Cache text.
use crate::core::{Font, Size};
use crate::text;
use rustc_hash::{FxHashMap, FxHashSet, FxHasher};
use std::collections::hash_map;
use std::hash::{Hash, Hasher};
/// A store of recently used sections of text.
#[derive(Debug, Default)]
pub struct Cache {
entries: FxHashMap<KeyHash, Entry>,
alias... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/graphics/src/text/paragraph.rs | graphics/src/text/paragraph.rs | //! Draw paragraphs.
use crate::core;
use crate::core::alignment;
use crate::core::text::{Alignment, Hit, LineHeight, Shaping, Span, Text, Wrapping};
use crate::core::{Font, Pixels, Point, Rectangle, Size};
use crate::text;
use std::fmt;
use std::sync::{self, Arc};
/// A bunch of text.
#[derive(Clone, PartialEq)]
pub... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/src/advanced.rs | src/advanced.rs | //! Leverage advanced concepts like custom widgets.
pub mod subscription {
//! Write your own subscriptions.
pub use crate::runtime::futures::subscription::{
Event, EventStream, Hasher, MacOS, PlatformSpecific, Recipe, from_recipe, into_recipes,
};
}
pub mod widget {
//! Create custom widgets a... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/src/lib.rs | src/lib.rs | //! iced is a cross-platform GUI library focused on simplicity and type-safety.
//! Inspired by [Elm].
//!
//! [Elm]: https://elm-lang.org/
//!
//! # Disclaimer
//! iced is __experimental__ software. If you expect the documentation to hold your hand
//! as you learn the ropes, you are in for a frustrating experience.
/... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/src/time.rs | src/time.rs | //! Listen and react to time.
pub use crate::core::time::*;
#[allow(unused_imports)]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "tokio", feature = "smol", target_arch = "wasm32")))
)]
pub use iced_futures::backend::default::time::*;
use crate::Task;
/// Returns a [`Task`] that produces the current [`Instant`]... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/src/error.rs | src/error.rs | use crate::futures;
use crate::graphics;
use crate::shell;
/// An error that occurred while running an application.
#[derive(Debug, thiserror::Error)]
pub enum Error {
/// The futures executor could not be created.
#[error("the futures executor could not be created")]
ExecutorCreationFailed(futures::io::Er... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/src/application.rs | src/application.rs | //! Create and run iced applications step by step.
//!
//! # Example
//! ```no_run,standalone_crate
//! use iced::widget::{button, column, text, Column};
//! use iced::Theme;
//!
//! pub fn main() -> iced::Result {
//! iced::application(u64::default, update, view)
//! .theme(Theme::Dark)
//! .center... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/src/window.rs | src/window.rs | //! Configure the window of your application in native platforms.
pub mod icon;
pub use icon::Icon;
pub use crate::core::window::*;
pub use crate::runtime::window::*;
| rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/src/daemon.rs | src/daemon.rs | //! Create and run daemons that run in the background.
use crate::application;
use crate::message;
use crate::program::{self, Program};
use crate::shell;
use crate::theme;
use crate::window;
use crate::{Element, Executor, Font, Preset, Result, Settings, Subscription, Task, Theme};
use iced_debug as debug;
use std::bo... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/src/touch.rs | src/touch.rs | //! Listen and react to touch events.
pub use crate::core::touch::{Event, Finger};
| rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
iced-rs/iced | https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/src/window/icon.rs | src/window/icon.rs | //! Attach an icon to the window of your application.
pub use crate::core::window::icon::*;
use crate::core::window::icon;
use std::io;
#[cfg(feature = "image")]
use std::path::Path;
/// Creates an icon from an image file.
///
/// This will return an error in case the file is missing at run-time. You may prefer [`f... | rust | MIT | 15c0e397a81933ca88a9a338caaac2a4689354f9 | 2026-01-04T15:34:40.545819Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.