FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    INameScope

    trait · ferroui-base · v0.5.0

    trait INameScope
    

    Defines a name scope.

    View source

    Members

    try_register_value

    fn try_register_value(self: &Self, name: &str, value: BoxedValue) -> Result<(), NameScopeValueError>
    

    Registers any non-null object, retaining its identity. The value form corresponds to the managed object parameter. Existing native-only custom scopes can override this method to accept plain objects too.

    Source

    register_value

    fn register_value(self: &Self, name: &str, value: BoxedValue)
    

    Registers any object; panics on the same errors as try_register_value.

    Source

    find_value

    fn find_value(self: &Self, name: &str) -> Option<BoxedValue>
    

    Finds any named object immediately, without traversing incomplete scopes.

    Source

    find_value_async

    fn find_value_async(self: &Self, name: &str) -> SynchronousCompletionAsyncResult<Option<BoxedValue>>
    

    Finds any named object, completing synchronously on registration or completion.

    Source

    register

    fn register(self: &Self, name: &str, element: Ref<FerroObject>)
    

    Registers an element in the name scope. Panics if the scope is completed or another element is registered with the name: see try_register for the form that reports these as errors.

    Source

    try_register

    fn try_register(self: &Self, name: &str, element: Ref<FerroObject>) -> Result<(), NameScopeError>
    

    Registers an element in the name scope, reporting a completed scope and a name that another element is registered with as errors. Registering an element again with its name does nothing.

    Source

    find_async

    fn find_async(self: &Self, name: &str) -> SynchronousCompletionAsyncResult<Option<Ref<FerroObject>>>
    

    Finds a named element in the name scope, waits for the scope to be completely populated before returning None. Returned results always complete synchronously.

    Source

    find

    fn find(self: &Self, name: &str) -> Option<Ref<FerroObject>>
    

    Finds a named element in the name scope, returns immediately, doesn't traverse the name scope stack.

    Source

    complete

    fn complete(self: &Self)
    

    Marks the name scope as completed, no further registrations will be allowed.

    Source

    is_completed

    fn is_completed(self: &Self) -> bool
    

    Whether the name scope is completed, no further registrations are allowed.

    Source

    attached_to

    fn attached_to(self: &Self, _owner: &Ref<FerroObject>)
    

    The scope became the value of the attached NameScope property of owner, which holds it from now on. Not a member of the managed original: there the scope and the element hold each other and the collector frees both; here the scope holds this one element weakly (it finds it as long as it is alive). A scope that holds no elements itself has nothing to do.

    Source

    detached_from

    fn detached_from(self: &Self, _owner: &Ref<FerroObject>)
    

    The scope is no longer the value of the attached NameScope property of owner: it holds the element as every other again.

    Source

    Trait implementations

    Availability

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