FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    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

    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.

    Source

    line_number

    fn line_number(self: &Self) -> i32
    

    The 1-based line number in the source file where the element is defined.

    Source

    line_position

    fn line_position(self: &Self) -> i32
    

    The 1-based column position in the source file where the element is defined.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ToString
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Eq
    • StaticType
    • Display
    • MarkupTyped

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.