pub struct RefreshPatch { /* private fields */ }Expand description
Go CredentialRefreshPatch: the partitions a refresh adopted from disk or refreshed,
each with the versions it may still be applied over.
Implementations§
Source§impl RefreshPatch
impl RefreshPatch
Sourcepub fn granted(&self) -> bool
pub fn granted(&self) -> bool
A grant was attempted for this refresh; otherwise it only adopted from disk.
Sourcepub fn can_apply_to(&self, metadata: &Map<String, Value>) -> bool
pub fn can_apply_to(&self, metadata: &Map<String, Value>) -> bool
Go CredentialRefreshPatch.CanApplyTo: some partition still holds a version the
refresh may be applied over in metadata.
Sourcepub fn apply(
&self,
target: &Map<String, Value>,
doc: &mut BTreeMap<String, GoValue>,
)
pub fn apply( &self, target: &Map<String, Value>, doc: &mut BTreeMap<String, GoValue>, )
Go CredentialRefreshPatch.Apply on the credential file as read under its lock:
target is its JSON, doc the same document as Go decodes it, which takes the
changes. A partition another writer replaced since the refresh began keeps that
writer’s version, without blocking the other partition; every other field stays
as the file has it.
Trait Implementations§
Source§impl Clone for RefreshPatch
impl Clone for RefreshPatch
Source§impl Debug for RefreshPatch
impl Debug for RefreshPatch
Auto Trait Implementations§
impl Forget for RefreshPatch
impl Freeze for RefreshPatch
impl Move for RefreshPatch
impl RefUnwindSafe for RefreshPatch
impl Send for RefreshPatch
impl Sync for RefreshPatch
impl Unpin for RefreshPatch
impl UnsafeUnpin for RefreshPatch
impl UnwindSafe for RefreshPatch
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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