Skip to main content

ApplicationSemanticModel

Struct ApplicationSemanticModel 

Source
pub struct ApplicationSemanticModel {
Show 71 fields pub expression_graph: ExpressionGraph, pub semantic_types: SemanticTypeModel, pub components: Vec<ComponentNode>, pub contexts: BTreeMap<ContextId, ContextEntity>, pub providers: BTreeMap<ProviderId, ProviderEntity>, pub consumers: BTreeMap<ConsumerId, ConsumerEntity>, pub forms: BTreeMap<FormId, FormEntity>, pub resource_endpoint_resolutions: Vec<ResourceEndpointResolution>, pub opaque_action_resolutions: Vec<OpaqueActionResolution>, pub resource_declarations: BTreeMap<ResourceId, ResourceDeclaration>, pub resource_activations: BTreeMap<ResourceActivationId, ResourceActivation>, pub form_field_declaration_candidates: Vec<FormFieldDeclarationCandidate>, pub form_fields: BTreeMap<FieldId, FormFieldEntity>, pub form_field_binding_candidates: Vec<FormFieldBindingCandidate>, pub form_field_bindings: BTreeMap<FieldBindingId, FormFieldBinding>, pub form_ownership: FormOwnershipGraph, pub validation_rule_candidates: Vec<ValidationRuleCandidate>, pub validation_rules: BTreeMap<ValidationRuleId, ValidationRule>, pub validation_graph: ValidationGraph, pub validation_dependency_plans: ValidationDependencyPlans, pub form_tracking: FormTrackingProducts, pub submissions: SubmissionProducts, pub submission_host_candidates: Vec<SubmissionHostCandidate>, pub submission_hosts: BTreeMap<SubmissionHostId, SubmissionHost>, pub serialization: SerializationProducts, pub reset: ResetProducts, pub form_ir: FormIrReport, pub optimized_form_ir: OptimizedFormIrReport, pub runtime_forms: RuntimeFormRegistry, pub slots: BTreeMap<SlotId, SlotEntity>, pub component_invocations: BTreeMap<ComponentInvocationId, ComponentInvocationEntity>, pub component_instance_plan: ComponentInstancePlan, pub component_instance_scope: ComponentInstanceScopeGraph, pub component_composition: ComponentCompositionAnalysis, pub component_initialization: ComponentInitializationPlan, pub component_ir: ComponentIrReport, pub component_ir_optimization: OptimizedComponentIrReport, pub instance_context: InstanceContextRegistry, pub slot_content_fragments: BTreeMap<SlotContentFragmentId, SlotContentFragment>, pub slot_outlets: BTreeMap<SlotOutletId, SlotOutlet>, pub slot_bindings: SlotBindingRegistry, pub composition_types: CompositionTypeProducts, pub context_declaration_candidates: ContextDeclarationCandidateRegistry, pub context_ownership: ContextOwnershipGraph, pub context_dependency: ContextDependencyGraph, pub context_lifetime: ContextLifetimeAnalysis, pub context_evaluation: ContextEvaluationPlan, pub component_scope: ComponentScopeGraph, pub context_resolutions: BTreeMap<ConsumerId, ContextResolution>, pub context_types: BTreeMap<ContextId, ContextTypeRecord>, pub provider_types: BTreeMap<ProviderId, ProviderTypeRecord>, pub consumer_types: BTreeMap<ConsumerId, ConsumerTypeRecord>, pub context_binding_types: BTreeMap<ConsumerId, ContextBindingTypeRecord>, pub duplicate_provider_declarations: Vec<DuplicateProviderDeclaration>, pub computed_values: BTreeMap<SemanticId, ComputedValue>, pub effects: BTreeMap<SemanticId, Effect>, pub effect_reactive_analysis: BTreeMap<SemanticId, EffectReactiveAnalysis>, pub effect_trigger_plan: EffectTriggerPlan, pub effect_execution_plan: EffectExecutionPlan, pub effect_bodies: BTreeMap<SemanticId, EffectBody>, pub effect_statements: BTreeMap<SemanticId, EffectStatement>, pub reactive_graph: IrReactiveGraph, pub reactive_transitive_analysis: IrReactiveTransitiveAnalysis, pub reactive_cycle_analysis: IrReactiveCycleAnalysis, pub computed_evaluation_plan: IrComputedEvaluationPlan, pub templates: Vec<TemplateNode>, pub template_entities: Vec<TemplateSemanticEntity>, pub diagnostics: Vec<ComponentDiagnostic>, pub ownership: BTreeMap<SemanticId, SemanticOwner>, pub references: Vec<SemanticReference>, pub provenance: BTreeMap<SemanticId, SourceProvenance>,
}
Expand description

Application-level semantic data assembled from the compiler’s existing graphs.

Fields§

§expression_graph: ExpressionGraph§semantic_types: SemanticTypeModel§components: Vec<ComponentNode>§contexts: BTreeMap<ContextId, ContextEntity>§providers: BTreeMap<ProviderId, ProviderEntity>§consumers: BTreeMap<ConsumerId, ConsumerEntity>§forms: BTreeMap<FormId, FormEntity>§resource_endpoint_resolutions: Vec<ResourceEndpointResolution>

Integrity-checked package endpoint selections for Resource declaration and activation lowering.

§opaque_action_resolutions: Vec<OpaqueActionResolution>

Integrity-checked opaque terminal package selections. These are resolution facts only until a later artifact/runtime lowering product consumes them.

§resource_declarations: BTreeMap<ResourceId, ResourceDeclaration>

Validated Resource declaration products projected into the canonical runtime activation artifact when a host supplies exact module locations.

§resource_activations: BTreeMap<ResourceActivationId, ResourceActivation>§form_field_declaration_candidates: Vec<FormFieldDeclarationCandidate>§form_fields: BTreeMap<FieldId, FormFieldEntity>§form_field_binding_candidates: Vec<FormFieldBindingCandidate>§form_field_bindings: BTreeMap<FieldBindingId, FormFieldBinding>§form_ownership: FormOwnershipGraph§validation_rule_candidates: Vec<ValidationRuleCandidate>§validation_rules: BTreeMap<ValidationRuleId, ValidationRule>§validation_graph: ValidationGraph§validation_dependency_plans: ValidationDependencyPlans§form_tracking: FormTrackingProducts§submissions: SubmissionProducts§submission_host_candidates: Vec<SubmissionHostCandidate>§submission_hosts: BTreeMap<SubmissionHostId, SubmissionHost>§serialization: SerializationProducts§reset: ResetProducts§form_ir: FormIrReport§optimized_form_ir: OptimizedFormIrReport§runtime_forms: RuntimeFormRegistry§slots: BTreeMap<SlotId, SlotEntity>§component_invocations: BTreeMap<ComponentInvocationId, ComponentInvocationEntity>§component_instance_plan: ComponentInstancePlan§component_instance_scope: ComponentInstanceScopeGraph§component_composition: ComponentCompositionAnalysis§component_initialization: ComponentInitializationPlan§component_ir: ComponentIrReport§component_ir_optimization: OptimizedComponentIrReport§instance_context: InstanceContextRegistry§slot_content_fragments: BTreeMap<SlotContentFragmentId, SlotContentFragment>§slot_outlets: BTreeMap<SlotOutletId, SlotOutlet>§slot_bindings: SlotBindingRegistry§composition_types: CompositionTypeProducts§context_declaration_candidates: ContextDeclarationCandidateRegistry§context_ownership: ContextOwnershipGraph§context_dependency: ContextDependencyGraph§context_lifetime: ContextLifetimeAnalysis§context_evaluation: ContextEvaluationPlan§component_scope: ComponentScopeGraph§context_resolutions: BTreeMap<ConsumerId, ContextResolution>§context_types: BTreeMap<ContextId, ContextTypeRecord>§provider_types: BTreeMap<ProviderId, ProviderTypeRecord>§consumer_types: BTreeMap<ConsumerId, ConsumerTypeRecord>§context_binding_types: BTreeMap<ConsumerId, ContextBindingTypeRecord>§duplicate_provider_declarations: Vec<DuplicateProviderDeclaration>§computed_values: BTreeMap<SemanticId, ComputedValue>§effects: BTreeMap<SemanticId, Effect>§effect_reactive_analysis: BTreeMap<SemanticId, EffectReactiveAnalysis>§effect_trigger_plan: EffectTriggerPlan§effect_execution_plan: EffectExecutionPlan§effect_bodies: BTreeMap<SemanticId, EffectBody>§effect_statements: BTreeMap<SemanticId, EffectStatement>§reactive_graph: IrReactiveGraph§reactive_transitive_analysis: IrReactiveTransitiveAnalysis§reactive_cycle_analysis: IrReactiveCycleAnalysis§computed_evaluation_plan: IrComputedEvaluationPlan§templates: Vec<TemplateNode>§template_entities: Vec<TemplateSemanticEntity>§diagnostics: Vec<ComponentDiagnostic>§ownership: BTreeMap<SemanticId, SemanticOwner>§references: Vec<SemanticReference>§provenance: BTreeMap<SemanticId, SourceProvenance>

Implementations§

Source§

impl ApplicationSemanticModel

Source

pub fn entity(&self, id: &SemanticId) -> Option<SemanticEntity<'_>>

Source

pub fn component(&self, id: &SemanticId) -> Option<&ComponentNode>

Source

pub fn template(&self, id: &SemanticId) -> Option<&TemplateNode>

Source

pub fn computed_value(&self, id: &SemanticId) -> Option<&ComputedValue>

Source

pub fn contexts(&self) -> Vec<&ContextEntity>

Source

pub fn context(&self, id: &ContextId) -> Option<&ContextEntity>

Source

pub fn forms(&self) -> Vec<&FormEntity>

Source

pub fn form(&self, id: &FormId) -> Option<&FormEntity>

Source

pub fn form_fields(&self) -> Vec<&FormFieldEntity>

Source

pub fn form_field(&self, id: &FieldId) -> Option<&FormFieldEntity>

Source

pub fn form_field_declaration_candidates( &self, ) -> &[FormFieldDeclarationCandidate]

Source

pub fn form_field_binding_candidates(&self) -> &[FormFieldBindingCandidate]

Source

pub fn form_field_bindings(&self) -> Vec<&FormFieldBinding>

Source

pub fn form_field_binding( &self, id: &FieldBindingId, ) -> Option<&FormFieldBinding>

Source

pub const fn form_ownership(&self) -> &FormOwnershipGraph

Source

pub fn validation_rule_candidates(&self) -> &[ValidationRuleCandidate]

Source

pub fn validation_candidates_of( &self, field: &FieldId, ) -> Vec<&ValidationRuleCandidate>

Source

pub fn validation_rule(&self, id: &ValidationRuleId) -> Option<&ValidationRule>

Source

pub fn validation_rules(&self) -> Vec<&ValidationRule>

Source

pub const fn validation_graph(&self) -> &ValidationGraph

Source

pub const fn validation_dependency_plans(&self) -> &ValidationDependencyPlans

Source

pub const fn form_tracking(&self) -> &FormTrackingProducts

Source

pub const fn submissions(&self) -> &SubmissionProducts

Source

pub const fn serialization(&self) -> &SerializationProducts

Source

pub const fn reset(&self) -> &ResetProducts

Source

pub fn form_declaration_candidates(&self) -> Vec<&FormDeclarationCandidate>

Source

pub const fn context_declaration_candidates( &self, ) -> &ContextDeclarationCandidateRegistry

Source

pub fn contexts_owned_by(&self, component: &SemanticId) -> Vec<&ContextId>

Source

pub fn context_for_authored_field( &self, field: &SemanticId, ) -> Option<&ContextId>

Source

pub fn providers(&self) -> Vec<&ProviderEntity>

Source

pub fn provider(&self, id: &ProviderId) -> Option<&ProviderEntity>

Source

pub fn providers_owned_by(&self, component: &SemanticId) -> Vec<&ProviderId>

Source

pub fn providers_for_context(&self, context: &ContextId) -> Vec<&ProviderId>

Source

pub fn provider_for_authored_field( &self, field: &SemanticId, ) -> Option<&ProviderId>

Source

pub fn consumers(&self) -> Vec<&ConsumerEntity>

Source

pub fn consumer(&self, id: &ConsumerId) -> Option<&ConsumerEntity>

Source

pub fn consumers_owned_by(&self, component: &SemanticId) -> Vec<&ConsumerId>

Source

pub fn consumers_for_context(&self, context: &ContextId) -> Vec<&ConsumerId>

Source

pub fn consumer_for_authored_field( &self, field: &SemanticId, ) -> Option<&ConsumerId>

Source

pub fn slots(&self) -> Vec<&SlotEntity>

Source

pub fn slot(&self, id: &SlotId) -> Option<&SlotEntity>

Source

pub fn slots_owned_by(&self, component: &SemanticId) -> Vec<&SlotId>

Source

pub fn slot_for_authored_field(&self, field: &SemanticId) -> Option<&SlotId>

Source

pub fn component_invocations(&self) -> Vec<&ComponentInvocationEntity>

Source

pub fn component_invocation( &self, id: &ComponentInvocationId, ) -> Option<&ComponentInvocationEntity>

Source

pub fn component_invocations_owned_by( &self, component: &SemanticId, ) -> Vec<&ComponentInvocationId>

Source

pub fn component_instance( &self, id: &ComponentInstanceId, ) -> Option<&ComponentInstance>

Source

pub fn component_build_roots(&self) -> Vec<&ComponentBuildRoot>

Source

pub fn component_instances(&self) -> Vec<&ComponentInstance>

Source

pub fn blocked_component_instances(&self) -> Vec<&BlockedComponentInstancePlan>

Source

pub fn blocked_component_instance( &self, id: &ComponentInstanceId, ) -> Option<&BlockedComponentInstancePlan>

Source

pub fn component_instances_for_definition( &self, component: &SemanticId, ) -> Vec<&ComponentInstance>

Source

pub const fn component_instance_scope_graph( &self, ) -> &ComponentInstanceScopeGraph

Source

pub const fn component_composition_analysis( &self, ) -> &ComponentCompositionAnalysis

Source

pub const fn component_initialization_plan( &self, ) -> &ComponentInitializationPlan

Source

pub const fn component_ir_report(&self) -> &ComponentIrReport

Source

pub const fn optimized_component_ir_report(&self) -> &OptimizedComponentIrReport

Source

pub const fn instance_context_registry(&self) -> &InstanceContextRegistry

Source

pub fn slot_content_fragments(&self) -> Vec<&SlotContentFragment>

Source

pub const fn slot_binding_registry(&self) -> &SlotBindingRegistry

Source

pub const fn composition_type_products(&self) -> &CompositionTypeProducts

Source

pub fn slot_bindings(&self) -> Vec<&SlotBinding>

Source

pub fn slot_binding(&self, id: &SlotBindingId) -> Option<&SlotBinding>

Source

pub fn slot_bindings_for_callee( &self, callee: &ComponentInstanceId, ) -> Vec<&SlotBinding>

Source

pub fn slot_content_fragment( &self, id: &SlotContentFragmentId, ) -> Option<&SlotContentFragment>

Source

pub fn slot_content_fragments_for( &self, invocation: &ComponentInvocationId, ) -> Vec<&SlotContentFragment>

Source

pub fn slot_outlets(&self) -> Vec<&SlotOutlet>

Source

pub fn slot_outlet(&self, id: &SlotOutletId) -> Option<&SlotOutlet>

Source

pub fn slot_outlets_owned_by( &self, component: &SemanticId, ) -> Vec<&SlotOutletId>

Source

pub fn context_resolution( &self, consumer: &ConsumerId, ) -> Option<&ContextResolution>

Source

pub const fn context_ownership_graph(&self) -> &ContextOwnershipGraph

Source

pub const fn context_dependency_graph(&self) -> &ContextDependencyGraph

Source

pub const fn context_lifetime_analysis(&self) -> &ContextLifetimeAnalysis

Source

pub const fn context_evaluation_plan(&self) -> &ContextEvaluationPlan

Source

pub fn resolved_provider(&self, consumer: &ConsumerId) -> Option<&ProviderId>

Source

pub fn consumers_resolved_to(&self, provider: &ProviderId) -> Vec<&ConsumerId>

Source

pub fn consumers_using_default(&self, context: &ContextId) -> Vec<&ConsumerId>

Source

pub fn unresolved_context_consumers(&self) -> Vec<&ConsumerId>

Source

pub fn context_type(&self, context: &ContextId) -> Option<&ContextTypeRecord>

Source

pub fn provider_type( &self, provider: &ProviderId, ) -> Option<&ProviderTypeRecord>

Source

pub fn consumer_type( &self, consumer: &ConsumerId, ) -> Option<&ConsumerTypeRecord>

Source

pub fn context_binding_type( &self, consumer: &ConsumerId, ) -> Option<&ContextBindingTypeRecord>

Source

pub fn runtime_eligible_context_binding(&self, consumer: &ConsumerId) -> bool

Source

pub fn effect(&self, id: &SemanticId) -> Option<&Effect>

Source

pub fn effect_body(&self, effect: &SemanticId) -> Option<&EffectBody>

Source

pub fn effect_reactive_analysis( &self, effect: &SemanticId, ) -> Option<&EffectReactiveAnalysis>

Source

pub const fn effect_trigger_plan(&self) -> &EffectTriggerPlan

Source

pub const fn effect_execution_plan(&self) -> &EffectExecutionPlan

Source

pub fn effect_statement_type( &self, statement: &SemanticId, ) -> Option<&EffectStatementTypeRecord>

Returns F4 typing facts for one canonical effect statement.

Source

pub fn effect_statement(&self, id: &SemanticId) -> Option<&EffectStatement>

Source

pub fn template_entity( &self, id: &SemanticId, ) -> Option<&TemplateSemanticEntity>

Source

pub fn template_entities_for( &self, template: &SemanticId, ) -> Vec<&TemplateSemanticEntity>

Source

pub fn owner(&self, id: &SemanticId) -> Option<&SemanticOwner>

Source

pub fn parent_of(&self, id: &SemanticId) -> Option<&SemanticId>

Source

pub fn ancestors_of(&self, id: &SemanticId) -> Vec<&SemanticId>

Source

pub fn provenance(&self, id: &SemanticId) -> Option<&SourceProvenance>

Source

pub fn expression(&self, id: &SemanticId) -> Option<&ExpressionNode>

Source

pub fn expression_root(&self, owner: &SemanticId) -> Option<&SemanticId>

Source

pub fn expressions_for(&self, owner: &SemanticId) -> Vec<&ExpressionNode>

Source

pub fn expression_dependencies(&self, id: &SemanticId) -> Vec<&SemanticId>

Source

pub fn expression_dependents(&self, id: &SemanticId) -> Vec<&ExpressionNode>

Source

pub fn expression_owner(&self, id: &SemanticId) -> Option<&SemanticId>

Source

pub fn expression_provenance( &self, id: &SemanticId, ) -> Option<&SourceProvenance>

Source

pub fn semantic_type_of(&self, id: &SemanticId) -> Option<&SemanticType>

Source

pub fn expression_type(&self, id: &SemanticId) -> Option<&SemanticType>

Source

pub fn type_declarations( &self, semantic_type: &SemanticType, ) -> Vec<&SemanticTypeAssignment>

Source

pub fn type_usages( &self, semantic_type: &SemanticType, ) -> Vec<&SemanticTypeAssignment>

Source

pub fn serialization_compatibility_of( &self, id: &SemanticId, ) -> Option<SerializationCompatibility>

Source

pub fn is_type_assignable( &self, source: &SemanticId, target: &SemanticId, ) -> Option<bool>

Source

pub fn expressions_in_file(&self, path: &Path) -> Vec<&ExpressionNode>

Source

pub fn expressions_at(&self, path: &Path, offset: usize) -> Vec<&ExpressionNode>

Source

pub fn application_roots(&self) -> Vec<&SemanticId>

Source

pub fn children_of(&self, owner: &SemanticId) -> Vec<&SemanticId>

Source

pub fn descendants_of(&self, owner: &SemanticId) -> Vec<&SemanticId>

Source

pub fn entities_of_kind(&self, kind: SemanticEntityKind) -> Vec<&SemanticId>

Source

pub fn entities_in_file(&self, path: &Path) -> Vec<&SemanticId>

Source

pub fn entities_at(&self, path: &Path, offset: usize) -> Vec<&SemanticId>

Source

pub fn references_of_kind( &self, kind: SemanticReferenceKind, ) -> Vec<&SemanticReference>

Source

pub fn references_in_file(&self, path: &Path) -> Vec<&SemanticReference>

Source

pub fn references_at( &self, path: &Path, offset: usize, ) -> Vec<&SemanticReference>

Source

pub fn references_from(&self, id: &SemanticId) -> Vec<&SemanticReference>

Source

pub fn references_to(&self, id: &SemanticId) -> Vec<&SemanticReference>

Trait Implementations§

Source§

impl Clone for ApplicationSemanticModel

Source§

fn clone(&self) -> ApplicationSemanticModel

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ApplicationSemanticModel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ApplicationSemanticModel

Source§

impl PartialEq for ApplicationSemanticModel

Source§

fn eq(&self, other: &ApplicationSemanticModel) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ApplicationSemanticModel

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.