pub struct PeerConfig { /* private fields */ }Expand description
How the peer behaves, before it is started.
Implementations§
Source§impl PeerConfig
impl PeerConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
A peer that behaves: FIXTURE_BEARER, both acknowledgements, no stall, cancel honoured.
Sourcepub fn expecting_bearer(self, bearer: &str) -> Self
pub fn expecting_bearer(self, bearer: &str) -> Self
The bearer the upgrade must carry verbatim. Anything else is refused 401 (ORB-10).
Sourcepub fn withholding(self, withhold: Withhold) -> Self
pub fn withholding(self, withhold: Withhold) -> Self
Withhold one of setup’s acknowledgements (ORB-15).
Sourcepub fn stalling_at(self, stall: StallPoint) -> Self
pub fn stalling_at(self, stall: StallPoint) -> Self
Go silent at this point while holding the socket open (ORB-14).
Sourcepub fn on_cancel(self, cancel: CancelPolicy) -> Self
pub fn on_cancel(self, cancel: CancelPolicy) -> Self
What to do with directed deltas after the client cancels (§4.3).
Sourcepub async fn start(self) -> Result<RealtimePeer, PeerError>
pub async fn start(self) -> Result<RealtimePeer, PeerError>
Bind a loopback listener and start serving.
The peer serves connections until it is dropped or RealtimePeer::shutdown is awaited.
Trait Implementations§
Source§impl Clone for PeerConfig
impl Clone for PeerConfig
Source§fn clone(&self) -> PeerConfig
fn clone(&self) -> PeerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeerConfig
impl Debug for PeerConfig
Auto Trait Implementations§
impl Freeze for PeerConfig
impl RefUnwindSafe for PeerConfig
impl Send for PeerConfig
impl Sync for PeerConfig
impl Unpin for PeerConfig
impl UnsafeUnpin for PeerConfig
impl UnwindSafe for PeerConfig
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