Struct bonsaidb::server::fabruic::Connecting
pub struct Connecting(_);
Expand description
Represent’s an intermediate state to build a Connection
.
Implementations§
§impl Connecting
impl Connecting
pub async fn protocol(
&mut self
) -> impl Future<Output = Result<Option<Vec<u8, Global>>, Connecting>>
pub async fn protocol( &mut self ) -> impl Future<Output = Result<Option<Vec<u8, Global>>, 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
) -> impl Future<Output = Result<Connection<T>, Connecting>>where
T: DeserializeOwned + Serialize + Send + 'static,
pub async fn accept<T>( self ) -> impl Future<Output = Result<Connection<T>, Connecting>>where T: DeserializeOwned + Serialize + Send + 'static,
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