pub struct PeerConnect<State = Connected>(/* private fields */);Implementations§
Source§impl PeerConnect<Connected>
impl PeerConnect<Connected>
pub async fn send_hello(self) -> Result<PeerConnect<Negotiating>, ConnectError>
Source§impl PeerConnect<Negotiating>
impl PeerConnect<Negotiating>
pub async fn recv_hello(self) -> Result<PeerConnect<Ready>, ConnectError>
Source§impl PeerConnect<Ready>
impl PeerConnect<Ready>
pub fn hello(&self) -> &PeerHello
pub fn close(self) -> Result<PeerConnect<Closed>, Infallible>
pub fn into_connection(self) -> PeerConnection
Trait Implementations§
Source§impl<State: Debug> Debug for PeerConnect<State>
impl<State: Debug> Debug for PeerConnect<State>
Source§impl From<Connection> for PeerConnect
impl From<Connection> for PeerConnect
Source§fn from(inner: Connection) -> Self
fn from(inner: Connection) -> Self
Converts to this type from the input type.
Source§impl MessageRecv for PeerConnect<Negotiating>
impl MessageRecv for PeerConnect<Negotiating>
Source§impl MessageRecv for PeerConnect<Ready>
impl MessageRecv for PeerConnect<Ready>
Source§impl MessageSend for PeerConnect<Negotiating>
impl MessageSend for PeerConnect<Negotiating>
Auto Trait Implementations§
impl<State> Freeze for PeerConnect<State>where
State: Freeze,
impl<State> RefUnwindSafe for PeerConnect<State>where
State: RefUnwindSafe,
impl<State> Send for PeerConnect<State>where
State: Send,
impl<State> Sync for PeerConnect<State>where
State: Sync,
impl<State> Unpin for PeerConnect<State>where
State: Unpin,
impl<State> UnsafeUnpin for PeerConnect<State>where
State: UnsafeUnpin,
impl<State> UnwindSafe for PeerConnect<State>where
State: UnwindSafe,
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> 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