pub struct Peer { /* private fields */ }Expand description
A resolved local Thread, with the admission scope chosen by its host. Export remains subject to the Thread’s current per-destination sharing policy.
Implementations§
Source§impl Peer
impl Peer
pub fn new( replica: ThreadReplica, endpoint: EndpointRef, facets: BTreeSet<ThreadFacet>, ) -> Result<Self, Error>
Enable original metadata author admission against this account’s local independently enrolled pin; never infer account ownership from delivery.
Sourcepub async fn connect<S, A, G, F>(
&self,
connection: Connection,
destination: EndpointKind,
signer: A,
store: Arc<S>,
feed: &Feed,
authorize: G,
) -> Result<(), Error>
pub async fn connect<S, A, G, F>( &self, connection: Connection, destination: EndpointKind, signer: A, store: Arc<S>, feed: &Feed, authorize: G, ) -> Result<(), Error>
Drives one RPC until cancellation, transport failure, or live authority revocation. Reopen with the same replica to repair from durable frontiers.
Sourcepub async fn accept<S>(
&self,
connection: Connection,
authority: Arc<RootAuthority>,
store: Arc<S>,
feed: &Feed,
) -> Result<(), Error>
pub async fn accept<S>( &self, connection: Connection, authority: Arc<RootAuthority>, store: Arc<S>, feed: &Feed, ) -> Result<(), Error>
Accept exactly one ReplicateThread RPC. The connection must be routed here by the host; other service methods are not advertised or emulated.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Peer
impl RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl UnsafeUnpin for Peer
impl UnwindSafe for Peer
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