pub struct PrivateMailbox { /* private fields */ }Implementations§
Source§impl PrivateMailbox
impl PrivateMailbox
Sourcepub fn publish_under(
&mut self,
d: ContactDescriptor,
disclosure: Disclosure,
) -> Result<(), FabricError>
pub fn publish_under( &mut self, d: ContactDescriptor, disclosure: Disclosure, ) -> Result<(), FabricError>
Store d only when disclosure permits its locator class.
Sourcepub fn publish(&mut self, d: ContactDescriptor) -> Result<(), FabricError>
pub fn publish(&mut self, d: ContactDescriptor) -> Result<(), FabricError>
Publishes d as the current contact.
Sourcepub fn resolve(
&self,
key: &PeerId,
now_unix: u32,
disclosure: Disclosure,
) -> Result<ContactDescriptor, FabricError>
pub fn resolve( &self, key: &PeerId, now_unix: u32, disclosure: Disclosure, ) -> Result<ContactDescriptor, FabricError>
Resolves the published contact.
Sourcepub fn ingest_wire(
&mut self,
bytes: &[u8],
now_unix: u32,
disclosure: Disclosure,
) -> Result<ContactDescriptor, FabricError>
pub fn ingest_wire( &mut self, bytes: &[u8], now_unix: u32, disclosure: Disclosure, ) -> Result<ContactDescriptor, FabricError>
Ingests a wire-format contact record.
Sourcepub fn encode_current(
&self,
key: &PeerId,
disclosure: Disclosure,
out: &mut [u8],
) -> Result<usize, FabricError>
pub fn encode_current( &self, key: &PeerId, disclosure: Disclosure, out: &mut [u8], ) -> Result<usize, FabricError>
Encodes the current contact for the wire.
Trait Implementations§
Source§impl Clone for PrivateMailbox
impl Clone for PrivateMailbox
impl Copy for PrivateMailbox
Auto Trait Implementations§
impl Freeze for PrivateMailbox
impl RefUnwindSafe for PrivateMailbox
impl Send for PrivateMailbox
impl Sync for PrivateMailbox
impl Unpin for PrivateMailbox
impl UnsafeUnpin for PrivateMailbox
impl UnwindSafe for PrivateMailbox
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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