FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RuntimeType

    struct · ferroui-static-view-locator · v0.5.0

    struct RuntimeType
    

    The run-time type of a view model: the TypeId the generated tables are keyed by and the path of the type (Type of the generated source, with FullName).

    View source

    Members

    of

    fn of<T: ?Sized + 'static>() -> Self
    

    The type T.

    Source

    new

    fn new(id: TypeId, name: &'static str) -> Self
    

    The type of the id id, named name.

    Source

    of_value

    fn of_value(value: &BoxedValue) -> Self
    

    The run-time type of the view model value (value.GetType()):

    • an object of the class model (Ref<T>, or a registered handle of one) is of the handle type of its class (Ref<T>), which the generator keys the classes by;
    • the handle Rc<T> of a registered reference type is of T;
    • with the feature reactiveui, an untyped view model (UntypedViewModel) is of the type of the view model it holds;
    • any other value is of its own type.

    Source

    of_any

    fn of_any(value: &dyn Any) -> Self
    

    The run-time type of a view model held as dyn Any (the view models of ReactiveUI). Its path is not known: std::any::type_name needs the static type.

    Source

    id

    fn id(self: &Self) -> TypeId
    

    The id of the type.

    Source

    name

    fn name(self: &Self) -> &'static str
    

    The path of the type (FullName), as std::any::type_name writes it.

    Source

    generic_definition

    fn generic_definition(self: &Self) -> Option<&'static str>
    

    The path of the generic type definition of the type, without its generic arguments (my_app::WidgetViewModel of my_app::WidgetViewModel<i32>); None for a type that is not generic (IsGenericType and GetGenericTypeDefinition()).

    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
    • ResourceKeyObject
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • StructuralPartialEq
    • PartialEq
    • Eq
    • Hash
    • Debug
    • Display

    Availability

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