pub struct OperatorHandle {
forward: Box<dyn HandleDid>,
verified: Mutex<Option<String>>,
checking: AtomicBool,
}Expand description
The operator’s handle, as the last poll tick verified it.
Fields§
§forward: Box<dyn HandleDid>§verified: Mutex<Option<String>>§checking: AtomicBoolWhether a check is running, so a nudged tick never starts a second.
Implementations§
Source§impl OperatorHandle
impl OperatorHandle
Sourcepub fn new(forward: impl HandleDid + 'static) -> Self
pub fn new(forward: impl HandleDid + 'static) -> Self
Resolves handles through forward. Holds no handle until a tick
verifies one.
Sourcepub fn over_network(doh: impl Into<String>) -> Self
pub fn over_network(doh: impl Into<String>) -> Self
Resolves handles through Network, asking doh.
Sourcepub fn read(&self) -> Option<String>
pub fn read(&self) -> Option<String>
The handle the operator goes by, checked both ways, or None.
Sourcepub(crate) fn refresh_in_background(
self: &Arc<Self>,
document: DidDocument,
private: PrivateAddresses,
)
pub(crate) fn refresh_in_background( self: &Arc<Self>, document: DidDocument, private: PrivateAddresses, )
Starts Self::refresh in a task of its own and returns at once.
Does nothing while an earlier check is still running.
Sourcepub(crate) async fn refresh(
&self,
document: &DidDocument,
private: PrivateAddresses,
)
pub(crate) async fn refresh( &self, document: &DidDocument, private: PrivateAddresses, )
Checks the handle document claims against where it points.
A lookup that reached nobody, or did not answer within
LOOKUP_TIMEOUT, keeps the handle already held, if the
document still claims it, so a resolver outage does not drop the
name from the page until the next tick. Anything else replaces it.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for OperatorHandle
impl !RefUnwindSafe for OperatorHandle
impl Send for OperatorHandle
impl Sync for OperatorHandle
impl Unpin for OperatorHandle
impl UnsafeUnpin for OperatorHandle
impl !UnwindSafe for OperatorHandle
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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