FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SynchronizationContextScheduler

    struct · ferroui-reactive · v0.5.0

    struct SynchronizationContextScheduler
    

    Schedules work on a context (SynchronizationContextScheduler), a Schedule of ferroui-system: each work is posted to it with Schedule::schedule_local, unless the scheduler does not always post and the schedule is the current one of the thread (ferroui_system::task::current_schedule), which runs it at once.

    View source

    Members

    with_schedule

    fn with_schedule(schedule: Arc<dyn Schedule>) -> Rc<Self>
    

    A scheduler that posts all its work to schedule (SynchronizationContextScheduler(SynchronizationContext)).

    Source

    with_schedule_and_always_post

    fn with_schedule_and_always_post(schedule: Arc<dyn Schedule>, always_post: bool) -> Rc<Self>
    

    A scheduler of schedule that runs its work at once when always_post is false and schedule is the current schedule of the thread (SynchronizationContextScheduler(SynchronizationContext, bool alwaysPost)).

    Source

    new

    fn new(context: Arc<dyn SynchronizationContext>) -> Rc<Self>
    

    A scheduler that posts all its work to context (SynchronizationContextScheduler(SynchronizationContext)).

    Deprecated since 0.5.0. use SynchronizationContextScheduler::with_schedule

    Source

    with_always_post

    fn with_always_post(context: Arc<dyn SynchronizationContext>, always_post: bool) -> Rc<Self>
    

    A scheduler of context that runs its work at once when always_post is false and context is the current context of the thread (SynchronizationContextScheduler(SynchronizationContext, bool alwaysPost)).

    Deprecated since 0.5.0. use SynchronizationContextScheduler::with_schedule_and_always_post

    Source

    context_schedule

    fn context_schedule(self: &Self) -> Option<&Arc<dyn Schedule>>
    

    The schedule the scheduler posts to (its context), None for a scheduler of a deprecated context. Not named schedule, which is the member of IScheduler.

    Source

    context

    fn context(self: &Self) -> &Arc<dyn SynchronizationContext>
    

    The context the scheduler posts to.

    Panics

    When the scheduler was made with a schedule (with_schedule).

    Deprecated since 0.5.0. use SynchronizationContextScheduler::context_schedule

    Source

    Trait implementations

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

    Availability

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