pub struct LocalSerializableState(/* private fields */);Expand description
One admission gate for every adapter over an exclusively owned database. Live participants retain both this gate and the physical owner, preventing adapter churn from replacing their liveness registry. The provider separately persists the graph and allocation watermark.
Implementations§
Source§impl LocalSerializableState
impl LocalSerializableState
Sourcepub fn with_admission<O: Send + Sync + 'static, T>(
self: &Arc<Self>,
owner: &Arc<O>,
control: &StorageReadControl,
operation: impl FnOnce(&dyn SerializableLeases) -> VersionResult<T>,
) -> VersionResult<T>
pub fn with_admission<O: Send + Sync + 'static, T>( self: &Arc<Self>, owner: &Arc<O>, control: &StorageReadControl, operation: impl FnOnce(&dyn SerializableLeases) -> VersionResult<T>, ) -> VersionResult<T>
Wait cancellably for shared admission and invoke the operation once. Lease release uses a separate registry lock, so the final participant may be dropped inside this operation without deadlocking. The borrowed owner remains retained throughout admission; native final-close work can run only afterward. The physical owner must enforce exclusive access by other processes.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LocalSerializableState
impl !RefUnwindSafe for LocalSerializableState
impl !UnwindSafe for LocalSerializableState
impl Send for LocalSerializableState
impl Sync for LocalSerializableState
impl Unpin for LocalSerializableState
impl UnsafeUnpin for LocalSerializableState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more