FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DispatcherFrame

    struct · ferroui-base · v0.5.0

    struct DispatcherFrame
    

    Represents an execution loop in the Dispatcher.

    Frames are shared handles: set_continue can be called from any thread.

    View source

    Members

    new

    fn new() -> Arc<DispatcherFrame>
    

    Constructs a new instance of the frame for the current dispatcher. The frame exits when all frames are requested to exit.

    Source

    with_exit_when_requested

    fn with_exit_when_requested(exit_when_requested: bool) -> Arc<DispatcherFrame>
    

    Constructs a new instance of the frame for the current dispatcher.

    exit_when_requested indicates whether or not this frame will exit when all frames are requested to exit. Dispatcher frames typically break down into two categories:

    1. Long running, general purpose frames, that exit only when told to. These frames should exit when requested.
    2. Short running, very specific frames that exit themselves when an important criteria is met. These frames may consider not exiting when requested in favor of waiting for their important criteria to be met. These frames should have a timeout associated with them.

    Source

    dispatcher

    fn dispatcher(self: &Self) -> &Arc<Dispatcher>
    

    The dispatcher this frame runs on.

    Source

    continue_

    fn continue_(self: &Self) -> bool
    

    Indicates that this dispatcher frame should continue.

    Source

    set_continue

    fn set_continue(self: &Self, value: bool)
    

    Sets whether this dispatcher frame should continue. Setting it to false exits the loop the frame is running.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

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