Expand description
§Qubit Lock
Lock utilities for the Qubit Rust libraries.
The crate provides:
- Synchronous lock wrappers with
Arcintegrated internally. - Optional asynchronous Tokio-based lock wrappers behind the
asyncfeature. - Monitor-style coordination traits and concrete parking_lot, standard-library, Tokio, and mock monitor implementations.
Public API items are re-exported from the crate root. The internal
lock and monitor modules are implementation details and are not public
import paths.
ⓘ
use qubit_lock::lock::Lock;ⓘ
use qubit_lock::monitor::Monitor;Structs§
- ArcAsync
Mutex - Asynchronous Mutex Wrapper
- ArcAsync
RwLock - Asynchronous Read-Write Lock Wrapper
- ArcMock
Monitor - Cloneable handle around a
MockMonitor. - ArcMutex
- Synchronous Mutex Wrapper (Parking Lot)
- ArcParking
LotMonitor - Arc-wrapped monitor for shared condition-based state coordination.
- ArcRw
Lock - Parking-lot read-write lock wrapper.
- ArcStd
Monitor - Arc-wrapped monitor for shared condition-based state coordination.
- ArcStd
Mutex - Synchronous Standard Mutex Wrapper
- ArcStd
RwLock - Standard-library read-write lock wrapper.
- ArcTokio
Monitor - Cloneable handle around a
TokioMonitor. - Mock
Monitor - Monitor implementation for deterministic tests.
- Parking
LotMonitor - Shared state protected by a mutex and a condition variable.
- Parking
LotMonitor Guard - Guard returned by
ParkingLotMonitor::lock. - StdMonitor
- Shared state protected by a mutex and a condition variable.
- StdMonitor
Guard - Guard returned by
StdMonitor::lock. - Tokio
Monitor - Asynchronous monitor built on Tokio synchronization primitives.
Enums§
- TryLock
Error - Non-blocking lock acquisition error.
- Wait
Timeout Result - Result of waiting for a predicate with an overall timeout.
- Wait
Timeout Status - Result of a timed wait operation.
Traits§
- Async
Condition Waiter - Waits asynchronously for predicates over protected monitor state.
- Async
Lock - Unified asynchronous lock trait
- Async
Monitor - Aggregate trait for asynchronous monitor-style synchronization.
- Async
Notification Waiter - Waits asynchronously until a notification is observed.
- Async
Timeout Condition Waiter - Waits asynchronously for predicates over protected state with timeouts.
- Async
Timeout Notification Waiter - Waits asynchronously for a notification with a relative timeout.
- Condition
Waiter - Waits for predicates over protected monitor state.
- Lock
- Unified synchronous lock trait
- Monitor
- Aggregate trait for blocking monitor-style synchronization.
- Notification
Waiter - Waits until a notification is observed.
- Notifier
- Sends notification signals to waiters.
- Shared
Async Monitor - Aggregate trait for cloneable, shared asynchronous monitor handles.
- Shared
Monitor - Aggregate trait for cloneable, shared blocking monitor handles.
- Timeout
Condition Waiter - Waits for predicates over protected state with relative timeouts.
- Timeout
Notification Waiter - Waits for a notification with a relative timeout.
Type Aliases§
- Async
Monitor Future - Sendable boxed future returned by asynchronous monitor operations.