Struct LiveConfigHandle
pub struct LiveConfigHandle { /* private fields */ }Expand description
Read-only live config facade.
Clones share the same canonical storage. The handle dereferences to
the published Config for the duration of one short read guard and
can also report the paired ConfigRevision under that same guard;
it exposes no write path and never hands out a writable Arc.
Implementations§
Source§impl LiveConfigHandle
impl LiveConfigHandle
Sourcepub fn same_storage(&self, other: &Self) -> bool
pub fn same_storage(&self, other: &Self) -> bool
Whether two handles observe the same canonical storage (same authority generation). Diagnostics and identity tests only; it says nothing about publication recency.
Sourcepub fn read(&self) -> LiveConfigReadGuard<'_>
pub fn read(&self) -> LiveConfigReadGuard<'_>
One short paired read of the published config.
Sourcepub fn snapshot_with_revision(&self) -> (Config, ConfigRevision)
pub fn snapshot_with_revision(&self) -> (Config, ConfigRevision)
Clone the published config together with its revision, observed as one pair.
Sourcepub fn revision(&self) -> ConfigRevision
pub fn revision(&self) -> ConfigRevision
The currently published revision.
Trait Implementations§
Source§impl Clone for LiveConfigHandle
impl Clone for LiveConfigHandle
Source§fn clone(&self) -> LiveConfigHandle
fn clone(&self) -> LiveConfigHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for LiveConfigHandle
impl !UnwindSafe for LiveConfigHandle
impl Freeze for LiveConfigHandle
impl Send for LiveConfigHandle
impl Sync for LiveConfigHandle
impl Unpin for LiveConfigHandle
impl UnsafeUnpin for LiveConfigHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more