Struct bonsaidb::server::fabruic::Connecting
pub struct Connecting(/* private fields */);
Expand description
Represent’s an intermediate state to build a Connection
.
Implementations§
§impl Connecting
impl Connecting
pub 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.
pub 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.
pub async fn accept<T>(self) -> Result<Connection<T>, Connecting>
pub async fn accept<T>(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