XamlSourceInfo
struct · ferroui-markup-xaml · v0.5.0
struct XamlSourceInfo
Represents source location information for an element within a XAML file.
This type is instantiated through the XAML compiler.
Members
TYPEnewsource_uriline_numberline_positionset_xaml_source_infoset_xaml_source_info_for_keyget_xaml_source_infoget_xaml_source_info_for_key
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this type.
new
fn new(line: i32, column: i32, file_path: Option<&str>) -> Self
Initializes a new instance with the specified line, column, and file path.
source_uri
fn source_uri(self: &Self) -> Option<&Url>
The full path of the source file containing the XAML element: the file URL of the path the element was loaded from.
line_number
fn line_number(self: &Self) -> i32
The 1-based line number in the source file where the element is defined.
line_position
fn line_position(self: &Self) -> i32
The 1-based column position in the source file where the element is defined.
set_xaml_source_info
fn set_xaml_source_info(obj: &BoxedValue, info: Option<XamlSourceInfo>)
Associates XAML source information with the specified object for debugging or diagnostic purposes.
This method is typically used to attach source information to objects at run time, which can be useful for debugging tools or diagnostics. The information does not keep the object alive.
set_xaml_source_info_for_key
fn set_xaml_source_info_for_key(dictionary: &Rc<dyn IResourceDictionary>, key: impl Into<ResourceKey>, info: Option<XamlSourceInfo>)
Associates XAML source information with a specified key in the given
resource dictionary. Passing None removes the source information of
the key.
get_xaml_source_info
fn get_xaml_source_info(obj: &BoxedValue) -> Option<XamlSourceInfo>
Retrieves the XAML source information associated with the specified object, if available.
get_xaml_source_info_for_key
fn get_xaml_source_info_for_key(dictionary: &Rc<dyn IResourceDictionary>, key: impl Into<ResourceKey>) -> Option<XamlSourceInfo>
Retrieves the XAML source information associated with the specified key in the given resource dictionary, if available.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneDebugStructuralPartialEqPartialEqEqStaticTypeDisplayMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.