Struct fabruic::Connecting
source · pub struct Connecting(/* private fields */);
Expand description
Represent’s an intermediate state to build a Connection
.
Implementations§
source§impl Connecting
impl Connecting
sourcepub async fn protocol(&mut self) -> Result<Option<Vec<u8>>, Connecting>
pub async fn protocol(&mut self) -> Result<Option<Vec<u8>>, Connecting>
The negotiated application protocol. See
Builder::set_protocols
.
Errors
error::Connecting
if the Connection
failed to be established.
sourcepub fn remote_address(&self) -> SocketAddr
pub fn remote_address(&self) -> SocketAddr
The peer’s address. Clients may change addresses at will, e.g. when switching to a cellular internet connection.
sourcepub async fn accept<T: DeserializeOwned + Serialize + Send + 'static>(
self
) -> Result<Connection<T>, Connecting>
pub async fn accept<T: DeserializeOwned + Serialize + Send + 'static>( self ) -> Result<Connection<T>, Connecting>
Accept the Connection
with the given T
as the type negotiator for
new streams.
Errors
error::Connecting
if the Connection
failed to be established.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Connecting
impl Send for Connecting
impl Sync for Connecting
impl Unpin for Connecting
impl !UnwindSafe for Connecting
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