FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DisposableLock

    struct · ferroui-base · v0.5.0

    struct DisposableLock
    

    A lock whose holder gets a disposable that releases it.

    The thread that holds the lock may take it again (the lock of the reference is a monitor); each disposable releases one entry, on the thread that took it.

    View source

    Members

    new

    fn new() -> Self
    

    Source

    try_lock

    fn try_lock(self: &Self) -> Option<Rc<dyn IDisposable>>
    

    Tries to take the lock. Returns the disposable that releases it if the lock was obtained.

    Source

    lock

    fn lock(self: &Self) -> Rc<dyn IDisposable>
    

    Enters a waiting lock.

    Source

    Trait implementations

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

    Availability

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