pub struct Connection<P> { /* private fields */ }
Implementations§
Source§impl<P> Connection<P>
impl<P> Connection<P>
Sourcepub fn new<S>(byte_stream: S, cfg: Config) -> Self
pub fn new<S>(byte_stream: S, cfg: Config) -> Self
Creates a new server connection without any encryption.
pub fn new_encrypted<S>(byte_stream: S, cfg: Config, sign: Keypair) -> Self
pub fn update_config(&self, cfg: Config)
pub fn configurator(&self) -> Configurator<Config>
pub async fn receive(&mut self) -> Option<Message<P>>
pub async fn close(self) -> Result<(), TaskError>
pub async fn wait(self) -> Result<(), TaskError>
Auto Trait Implementations§
impl<P> Freeze for Connection<P>
impl<P> !RefUnwindSafe for Connection<P>
impl<P> Send for Connection<P>where
P: Send,
impl<P> Sync for Connection<P>where
P: Send,
impl<P> Unpin for Connection<P>
impl<P> !UnwindSafe for Connection<P>
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