pub struct SemanticId(/* private fields */);Expand description
Globally stable identity for a compiler semantic entity.
IDs use the component element name when available because it is the application-facing component identity. Invalid components without an element declaration fall back to their class name so diagnostics and later ASM validation can still refer to them deterministically.
Implementations§
Source§impl SemanticId
impl SemanticId
pub fn component_root(component: &Self) -> Self
pub fn component(element_name: Option<&str>, class_name: &str) -> Self
pub fn component_in_module( module_path: impl AsRef<Path>, element_name: Option<&str>, class_name: &str, ) -> Self
pub fn type_alias_in_module(module_path: impl AsRef<Path>, name: &str) -> Self
pub fn state_field(&self, name: &str) -> Self
pub fn method(&self, name: &str) -> Self
pub fn computed(&self, name: &str) -> Self
pub fn effect(&self, name: &str) -> Self
pub fn context(&self, name: &str) -> Self
pub fn context_field(&self, name: &str) -> Self
pub fn provider(&self, name: &str) -> Self
pub fn provider_field(&self, name: &str) -> Self
pub fn consumer(&self, name: &str) -> Self
pub fn consumer_field(&self, name: &str) -> Self
pub fn form(&self, name: &str) -> Self
pub fn resource(&self, name: &str) -> Self
pub fn route_loader(&self, name: &str) -> Self
pub fn server_action(&self, name: &str) -> Self
pub fn form_field(&self, name: &str) -> Self
pub fn form_declaration_candidate_in_module( module_path: impl AsRef<Path>, position: usize, ) -> Self
pub fn form_field_declaration_candidate_in_module( module_path: impl AsRef<Path>, position: usize, ) -> Self
pub fn form_field_binding_candidate_in_module( module_path: impl AsRef<Path>, position: usize, ) -> Self
pub fn validation_rule_candidate_in_module( module_path: impl AsRef<Path>, position: usize, ) -> Self
pub fn submission_declaration_candidate_in_module( module_path: impl AsRef<Path>, position: usize, ) -> Self
pub fn field(&self, name: &str) -> Self
pub fn validation_rule(&self, ordinal: usize) -> Self
pub fn validation_plan(&self) -> Self
pub fn field_dependency(&self, source_field: &Self) -> Self
pub fn dirty_tracking_plan(&self) -> Self
pub fn touched_tracking_plan(&self) -> Self
pub fn field_tracking(&self) -> Self
pub fn submission_plan(&self) -> Self
pub fn serialization_plan(&self) -> Self
pub fn reset_plan(&self) -> Self
pub fn field_reset_operation(&self, field: &Self) -> Self
pub fn form_instance(&self, form: &str) -> Self
pub fn slot(&self, name: &str) -> Self
pub fn slot_field(&self, name: &str) -> Self
pub fn slot_declaration_candidate(&self, position: usize) -> Self
pub fn context_declaration_candidate(&self, position: usize) -> Self
Sourcepub fn context_provider_function(&self) -> Self
pub fn context_provider_function(&self) -> Self
Stable generated-function identity for a Provider Context source.
Sourcepub fn context_default_function(&self) -> Self
pub fn context_default_function(&self) -> Self
Stable generated-function identity for a Context-default source.
Sourcepub fn context_consumer_load(&self) -> Self
pub fn context_consumer_load(&self) -> Self
Stable semantic origin used only to scope a retained Context Consumer load value.
pub fn effect_activation_slot(&self, name: &str) -> Self
pub fn effect_statement(&self, index: usize) -> Self
pub fn action(&self, method: &str, index: usize) -> Self
pub fn action_batch(&self, method: &str) -> Self
pub fn opaque_activation(&self, method: &str) -> Self
pub fn local_variable(&self, name: &str, index: usize) -> Self
pub fn parameter(&self, name: &str, index: usize) -> Self
pub fn expression(&self, path: &str) -> Self
pub fn semantic_type(&self) -> Self
pub fn event_handler(&self, event: &str, index: usize) -> Self
pub fn template(&self) -> Self
pub fn template_entity(&self, kind: &str, path: &str) -> Self
pub fn component_invocation(&self, target: &str) -> Self
Sourcepub fn layout_composition_invocation(
&self,
route: &Self,
position: usize,
) -> Self
pub fn layout_composition_invocation( &self, route: &Self, position: usize, ) -> Self
Compiler-issued identity for one automatic file-route layout edge.
pub fn template_position(&self) -> Self
pub fn field_binding(&self, field: &str) -> Self
pub fn slot_content_fragment(&self, slot_name: &str) -> Self
pub fn slot_outlet(&self, slot_name: &str) -> Self
pub fn slot_binding(&self, binding_key: &str) -> Self
pub fn component_instance_invocation(&self, invocation: &str) -> Self
pub fn component_structural_region(&self, kind: &str) -> Self
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl Clone for SemanticId
impl Clone for SemanticId
Source§fn clone(&self) -> SemanticId
fn clone(&self) -> SemanticId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SemanticId
impl Debug for SemanticId
Source§impl<'de> Deserialize<'de> for SemanticId
impl<'de> Deserialize<'de> for SemanticId
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SemanticId
impl Display for SemanticId
impl Eq for SemanticId
Source§impl Hash for SemanticId
impl Hash for SemanticId
Source§impl Ord for SemanticId
impl Ord for SemanticId
Source§fn cmp(&self, other: &SemanticId) -> Ordering
fn cmp(&self, other: &SemanticId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SemanticId
impl PartialEq for SemanticId
Source§impl PartialOrd for SemanticId
impl PartialOrd for SemanticId
Source§impl Serialize for SemanticId
impl Serialize for SemanticId
impl StructuralPartialEq for SemanticId
Auto Trait Implementations§
impl Freeze for SemanticId
impl RefUnwindSafe for SemanticId
impl Send for SemanticId
impl Sync for SemanticId
impl Unpin for SemanticId
impl UnsafeUnpin for SemanticId
impl UnwindSafe for SemanticId
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
Mutably borrows from an owned value. Read more
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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,
Set the foreground color generically Read more
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Set the background color generically. Read more
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Change the foreground color to black
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Change the background color to black
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Change the foreground color to red
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Change the background color to red
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Change the foreground color to green
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Change the background color to green
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Change the foreground color to yellow
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Change the background color to yellow
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Change the foreground color to blue
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Change the background color to blue
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Change the foreground color to magenta
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Change the background color to magenta
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Change the foreground color to purple
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Change the background color to purple
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Change the foreground color to cyan
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Change the background color to cyan
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Change the foreground color to white
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Change the background color to white
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Change the foreground color to the terminal default
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Change the background color to the terminal default
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Change the foreground color to bright black
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Change the background color to bright black
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Change the foreground color to bright red
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Change the background color to bright red
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Change the foreground color to bright green
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Change the background color to bright green
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Change the foreground color to bright yellow
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Change the background color to bright yellow
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Change the foreground color to bright blue
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Change the background color to bright blue
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright magenta
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright magenta
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright purple
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright purple
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Change the foreground color to bright cyan
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Change the background color to bright cyan
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Change the foreground color to bright white
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Change the background color to bright white
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Make the text bold
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Make the text dim
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Make the text italicized
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Make the text underlined
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Make the text blink
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Make the text blink (but fast!)
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Swap the foreground and background colors
Hide the text
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Cross out the text
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,
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 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,
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 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>
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>
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>
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>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Sets the background color to an RGB value.
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more