pub struct Context {Show 17 fields
pub typing_context: VarType,
pub subtypes: Graph<Type>,
pub type_constructors: Vec<(String, Vec<Type>, ConstructorCategory)>,
pub interface_constraints: HashMap<String, Type>,
pub rigid_counter: u64,
pub record_aliases: Vec<(String, Type)>,
pub embedded_methods: Vec<(String, String, String)>,
pub test_preamble: Vec<String>,
pub self_type: Option<Type>,
pub expected_return_type: Option<Type>,
pub module_inner_contexts: HashMap<String, Arc<Context>>,
pub processed_modules: HashMap<String, Type>,
pub modules_in_progress: HashSet<String>,
pub extern_fns: Vec<(String, Option<String>)>,
pub import_from_fns: Vec<(String, String)>,
pub signature_fns: Vec<String>,
pub vectorizable_fns: Vec<(String, bool)>,
/* private fields */
}Fields§
§typing_context: VarType§subtypes: Graph<Type>§type_constructors: Vec<(String, Vec<Type>, ConstructorCategory)>Registry of user-declared typeconstructors: (name, parameter signature, category).
interface_constraints: HashMap<String, Type>Constraints mapping a rigid generic variable name to its interface. Introduced when an interface type appears in parameter position: fn(i: I): R ⇒ i : A with A: I stored here.
rigid_counter: u64Counter for generating unique rigid generic variable names.
record_aliases: Vec<(String, Type)>Flat, whole-program registry of every type X <- list { ... } record
alias declared anywhere, including inside mod bodies. Unlike
typing_context.aliases, this is never scoped away at a module
boundary: R’s S3 class system has no module privacy, so transpilation
needs the full picture to compute structural supertypes for the class
vector (see record_field_class callers in processes::transpiling).
embedded_methods: Vec<(String, String, String)>Named type embedding (embed field: Type): provenance of every function
auto-generated by forwarding/reconstruction, as (type_name, method_name, source_field_name). Used to detect a later explicit definition that
collides with an inherited embedded function (E-EMBED-003).
test_preamble: Vec<String>RFC-TR-031: lines injected at the top of a Test { ... } file so the
test body can reach @testable private members of the enclosing module
(e.g. sq <- Math$.test_sq). Set while transpiling a module body in a
test build; empty otherwise. Not serialised.
self_type: Option<Type>Self:{ ... } (generic_constructor.md): the type bound to the
enclosing function/method’s first parameter, set only while
type-checking that function’s body. None everywhere else, which is
what makes Self invalid outside a function body.
expected_return_type: Option<Type>The declared return type of the function whose body is currently being
type-checked (audit_type_checking.md C1) — lets Lang::Return compare
an early return against the same target the trailing expression is
checked against in function(). None outside a function body.
module_inner_contexts: HashMap<String, Arc<Context>>Inner typing contexts computed while type-checking each module M { ... }
body, keyed by module name. Populated during type-checking; consumed
during transpilation to avoid re-running typing() on every module body.
processed_modules: HashMap<String, Type>Cache of fully type-checked modules. Maps module name → its
Type::Module so that use Module::*; can be resolved without
re-walking the module path in the variable table. Populated by
eval() for Lang::Module and consumed by typing() for
Lang::UseModule.
modules_in_progress: HashSet<String>Set of module names whose body is currently being type-checked.
Used to detect circular import chains at the type-checking level.
A Lang::UseModule targeting a name in this set is a cycle error.
extern_fns: Vec<(String, Option<String>)>Registry of @extern function declarations: (TypR name, R-side qualified name).
When Option<String> is None the TypR name is used directly as the R call.
import_from_fns: Vec<(String, String)>Registry of @importFrom declarations: (TypR function name, “pkg::fn_name”).
At call sites the transpiler emits pkg::fn_name(args) instead of fn_name(args),
bypassing TypR’s own S3 generic stubs for names like get, map, factor.
signature_fns: Vec<String>Names declared signature-only (@name: T;), i.e. typed here but
implemented in R somewhere else — base R, a package, or hand-written R.
Unlike an ordinary let, such a name has no TypR body to transpile
into name.<Type> methods, so shadowing it with a UseMethod stub
strands whatever R implementation it was declared for. typr build
reads this to tell the two cases apart when deciding whether a missing
<name>.default is worth reporting (see r_name_lint).
vectorizable_fns: Vec<(String, bool)>Static vectorizability of user-declared functions, keyed by name:
true means every declaration seen so far for that name has a body
made only of natively-vectorized R operations (see
processes::type_checking::vectorizability), so a Vec[N, T] call
site may call it directly instead of wrapping it in vapply. Any
non-vectorizable overload of the same name downgrades the entry to
false for good (S3 dispatch at the call site can’t tell overloads
apart by name alone).
Implementations§
Source§impl Context
impl Context
Sourcepub fn fingerprint(&self) -> u64
pub fn fingerprint(&self) -> u64
Order-stable hash of everything in the context that can influence how a subsequent expression is typed or transpiled.
Source§impl Context
impl Context
pub fn new(types: Vec<(Var, Type)>) -> Context
pub fn empty() -> Self
pub fn is_extern_fn(&self, name: &str) -> bool
Sourcepub fn is_signature_fn(&self, name: &str) -> bool
pub fn is_signature_fn(&self, name: &str) -> bool
Whether name was introduced by a signature declaration (@name: T;)
rather than by a TypR definition with a body.
pub fn get_extern_r_name(&self, name: &str) -> Option<String>
pub fn is_import_from_fn(&self, name: &str) -> bool
pub fn get_import_from_r_name(&self, name: &str) -> Option<String>
Sourcepub fn register_vectorizable_fn(self, name: &str, is_vectorizable: bool) -> Self
pub fn register_vectorizable_fn(self, name: &str, is_vectorizable: bool) -> Self
Record whether a user function declaration has a natively-vectorizable body. A name is only vectorizable while every declaration seen for it is — one non-vectorizable overload downgrades the entry permanently.
pub fn is_vectorizable_fn(&self, name: &str) -> bool
pub fn set_config(self, config: Config) -> Self
pub fn set_as_module_context(self) -> Context
pub fn set_test_mode(self, val: bool) -> Context
pub fn get_test_mode(&self) -> bool
pub fn set_checked_mode(self, val: bool) -> Context
pub fn get_checked_mode(&self) -> bool
pub fn set_test_preamble(self, lines: Vec<String>) -> Context
Sourcepub fn set_self_type(self, self_type: Option<Type>) -> Context
pub fn set_self_type(self, self_type: Option<Type>) -> Context
Self:{ ... } (generic_constructor.md §4.1): bind/clear the type
denoted by Self for the duration of typing a function body.
Sourcepub fn set_expected_return_type(
self,
expected_return_type: Option<Type>,
) -> Context
pub fn set_expected_return_type( self, expected_return_type: Option<Type>, ) -> Context
Bind/clear the declared return type of the function whose body is currently being type-checked (audit_type_checking.md C1).
pub fn get_expected_return_type(&self) -> Option<Type>
pub fn store_module_inner_context(self, name: &str, inner: &Context) -> Self
pub fn get_module_inner_context(&self, name: &str) -> Option<&Context>
Sourcepub fn mark_module_in_progress(self, name: &str) -> Self
pub fn mark_module_in_progress(self, name: &str) -> Self
Mark a module as currently being type-checked. Returns the updated
context with name added to modules_in_progress.
Sourcepub fn unmark_module_in_progress(self, name: &str) -> Self
pub fn unmark_module_in_progress(self, name: &str) -> Self
Remove a module from the in-progress set after its body has been fully type-checked.
Sourcepub fn is_module_in_progress(&self, name: &str) -> bool
pub fn is_module_in_progress(&self, name: &str) -> bool
True when name is currently being type-checked (its body is on the
call stack). A use {name}::*; encountered while this returns true
is a circular dependency.
Sourcepub fn cache_processed_module(self, name: &str, module_type: Type) -> Self
pub fn cache_processed_module(self, name: &str, module_type: Type) -> Self
Register module_type in the processed-module cache so that
subsequent use {name}::*; directives can resolve it without
walking the full variable-path chain.
Sourcepub fn get_processed_module(&self, name: &str) -> Option<&Type>
pub fn get_processed_module(&self, name: &str) -> Option<&Type>
Look up a previously cached module by name. Returns Some(module_type)
when name has already been fully type-checked in this session.
pub fn set_in_module_body(self) -> Self
pub fn is_in_module_body(&self) -> bool
Sourcepub fn set_in_loop(self, val: bool) -> Self
pub fn set_in_loop(self, val: bool) -> Self
See Config::in_loop — set while type-checking the body of a
Loop/WhileLoop/ForLoop so break/next inside it are valid.
pub fn is_in_loop(&self) -> bool
Sourcepub fn with_subtypes(self, subtypes: Graph<Type>) -> Self
pub fn with_subtypes(self, subtypes: Graph<Type>) -> Self
Retourne un nouveau Context avec le Graph de sous-typage mis à jour
pub fn get_members(&self) -> Vec<(Var, Type)>
pub fn variable_exist(&self, var: Var) -> Option<Var>
pub fn get_type_from_variable(&self, var: &Var) -> Result<Type, String>
pub fn get_types_from_name(&self, name: &str) -> Vec<Type>
pub fn get_type_from_aliases(&self, var: &Var) -> Option<Type>
Sourcepub fn find_alias_source_module(&self, name: &str) -> Option<String>
pub fn find_alias_source_module(&self, name: &str) -> Option<String>
Search every module currently in scope (declared via module M { ... }
somewhere visible, whether or not any of its members were ever brought
in via use) for a public alias named name. Returns the module’s
name on a hit — used to tell “genuinely undefined alias” apart from
“exists, but this file never imported it” so the error can point at
the fix (use M::Name;) instead of just saying “not defined”.
Sourcepub fn find_variable_source_module(&self, name: &str) -> Option<(String, bool)>
pub fn find_variable_source_module(&self, name: &str) -> Option<(String, bool)>
Same idea as find_alias_source_module, but for ordinary names
(variables and functions) rather than type aliases. Scans every
module currently in scope for a member named name, checking public
members first, then private ones — returns (module_name, is_public) on a hit. A private hit still points the error at
use M::name; (per the fix this supports): the member exists and
this is where it lives, even though that particular use will itself
fail with PrivateImport until the declaration gains @pub/@export.
pub fn get_matching_alias_signature( &self, var: &Var, ) -> Option<(Type, Vec<Type>)>
pub fn variables(&self) -> impl Iterator<Item = &(Var, Type)> + '_
pub fn aliases(&self) -> impl Iterator<Item = &(Var, Type)> + '_
Sourcepub fn fresh_rigid_name(self) -> (String, Self)
pub fn fresh_rigid_name(self) -> (String, Self)
Generate a fresh rigid generic variable name (immutable builder pattern).
Sourcepub fn add_interface_constraint(
self,
rigid_name: String,
interface: Type,
) -> Context
pub fn add_interface_constraint( self, rigid_name: String, interface: Type, ) -> Context
Register a constraint: rigid variable → interface type.
Sourcepub fn get_interface_constraint(&self, name: &str) -> Option<&Type>
pub fn get_interface_constraint(&self, name: &str) -> Option<&Type>
Look up the interface constraint for a rigid variable.
Sourcepub fn is_rigid_constrained(&self, name: &str) -> bool
pub fn is_rigid_constrained(&self, name: &str) -> bool
Check if a name is a constrained rigid variable.
pub fn push_var_type(self, lang: Var, typ: Type, context: &Context) -> Context
pub fn replace_or_push_var_type( self, lang: Var, typ: Type, context: &Context, ) -> Context
pub fn remove_vars(self, vars: &[Var]) -> Context
pub fn push_types(self, types: &[Type]) -> Self
Sourcepub fn hoist_aliases(self, inner: &Context) -> Self
pub fn hoist_aliases(self, inner: &Context) -> Self
Hoists auto-generated type-alias registrations from an inner scope’s
context (function body, module body) into this one — see
VarType::hoist_aliases. The hoisted types are also added to the
subtype graph so structural supertype lookups (S3 class chains)
keep working outside the scope that registered them.
pub fn get_type_from_existing_variable(&self, var: Var) -> Type
pub fn get_true_variable(&self, var: &Var) -> Var
pub fn is_an_untyped_function(&self, name: &str) -> bool
Sourcepub fn atomic_array_elem(&self, t: &Type) -> Option<Type>
pub fn atomic_array_elem(&self, t: &Type) -> Option<Type>
Step ③ (unification_arrays.md): does t denote an array with the
bare-atomic-vector runtime representation? See
VarType::atomic_array_elem — the single representation predicate.
pub fn get_class(&self, t: &Type) -> String
pub fn get_class_unquoted(&self, t: &Type) -> String
pub fn module_aliases(&self) -> Vec<(Var, Type)>
pub fn get_type_anotations(&self) -> String
pub fn get_type_anotation(&self, t: &Type) -> String
pub fn get_type_anotation_no_parentheses(&self, t: &Type) -> String
Sourcepub fn resolves_to_foreign_alias(&self, name: &str) -> bool
pub fn resolves_to_foreign_alias(&self, name: &str) -> bool
Does name resolve (through alias hops) to the stdlib Foreign<T>
alias? See VarType::resolves_to_foreign / get_type_anotation for
the rationale (soundness_transpilation.md Phase D).
pub fn get_classes(&self, t: &Type) -> Option<String>
pub fn get_functions(&self, var1: Var) -> Vec<(Var, Type)>
pub fn get_all_generic_functions(&self) -> Vec<(Var, Type)>
pub fn get_first_matching_function(&self, var1: Var) -> Type
pub fn get_matching_typed_functions(&self, var1: Var) -> Vec<Type>
pub fn get_matching_untyped_functions( &self, var: Var, ) -> Result<Vec<Type>, String>
pub fn get_matching_functions(&self, var: Var) -> Result<Vec<Type>, String>
pub fn get_type_from_class(&self, class: &str) -> Type
pub fn add_arg_types(&self, params: &[ArgumentType]) -> Context
pub fn set_environment(&self, e: Environment) -> Context
pub fn display_typing_context(&self) -> String
pub fn error(&self, msg: String) -> String
pub fn push_alias(self, alias_name: String, typ: Type) -> Self
Sourcepub fn push_type_constructor(
self,
name: String,
parameters: Vec<Type>,
category: ConstructorCategory,
) -> Self
pub fn push_type_constructor( self, name: String, parameters: Vec<Type>, category: ConstructorCategory, ) -> Self
Register a user-declared typeconstructor in the registry.
Sourcepub fn get_type_constructor(
&self,
name: &str,
) -> Option<&(String, Vec<Type>, ConstructorCategory)>
pub fn get_type_constructor( &self, name: &str, ) -> Option<&(String, Vec<Type>, ConstructorCategory)>
Look up a declared typeconstructor by name.
Sourcepub fn push_record_alias(self, name: String, typ: Type) -> Self
pub fn push_record_alias(self, name: String, typ: Type) -> Self
Register a type X <- list { ... } record alias in the whole-program
registry, regardless of the current module scope. No-op for non-record
aliases. Last declaration for a given name wins.
Sourcepub fn merge_record_aliases(self, other: &Context) -> Self
pub fn merge_record_aliases(self, other: &Context) -> Self
Merge another context’s whole-program record-alias registry into this
one. Used at module boundaries, where the rest of the inner typing
context is intentionally discarded for encapsulation but this registry
must still bubble up (see Lang::Module in processes::type_checking).
Sourcepub fn push_embedded_method(
self,
type_name: String,
method_name: String,
field_name: String,
) -> Self
pub fn push_embedded_method( self, type_name: String, method_name: String, field_name: String, ) -> Self
Record that method_name on type_name was auto-generated by named type
embedding (embed field: Type), forwarded from field_name. See
processes::type_checking::embedding.
Sourcepub fn get_embedded_method(
&self,
type_name: &str,
method_name: &str,
) -> Option<String>
pub fn get_embedded_method( &self, type_name: &str, method_name: &str, ) -> Option<String>
If method_name on type_name was inherited via named type embedding,
return the source field name it was forwarded from.
pub fn push_alias2(self, alias_var: Var, typ: Type) -> Self
pub fn in_a_project(&self) -> bool
pub fn get_unification_map( &self, entered_types: &[Type], param_types: &[Type], ) -> Option<UnificationMap>
pub fn get_functions_from_type(&self, typ: &Type) -> Vec<(Var, Type)>
pub fn get_functions_from_name(&self, name: &str) -> Vec<(Var, Type)>
pub fn get_type_definition(&self, _functions: &VarFunction) -> String
pub fn update_variable(self, var: Var) -> Self
pub fn set_target_language(self, language: TargetLanguage) -> Self
pub fn set_default_var_types(self) -> Self
pub fn get_target_language(&self) -> TargetLanguage
pub fn set_new_aliase_signature(self, alias: &str, related_type: Type) -> Self
pub fn extract_module_as_vartype(&self, module_name: &str) -> Self
pub fn get_vartype(&self) -> VarType
pub fn get_environment(&self) -> Environment
pub fn extend_typing_context(self, var_types: VarType) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Context
impl<'de> Deserialize<'de> for Context
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<Context> for Translatable
impl From<Context> for Translatable
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.