pub struct Connection(/* private fields */);
Implementations§
Source§impl Connection
impl Connection
pub fn new_client( server_name: String, token_sink: Arc<dyn TokenSink>, ) -> ClientFoundation
pub fn new_server(token_provider: Arc<dyn TokenProvider>) -> ServerFoundation
Source§impl Connection
impl Connection
pub fn close(&self, reason: impl Into<Cow<'static, str>>, code: u64) -> bool
pub async fn open_bi_stream( &self, ) -> Result<Option<(StreamId, (Reader<Ext<ArcReliableFrameDeque<ReliableFrame>>>, Writer<Ext<ArcReliableFrameDeque<ReliableFrame>>>))>, Error>
pub async fn open_uni_stream( &self, ) -> Result<Option<(StreamId, Writer<Ext<ArcReliableFrameDeque<ReliableFrame>>>)>, Error>
pub async fn accept_bi_stream( &self, ) -> Result<(StreamId, (Reader<Ext<ArcReliableFrameDeque<ReliableFrame>>>, Writer<Ext<ArcReliableFrameDeque<ReliableFrame>>>)), Error>
pub async fn accept_uni_stream( &self, ) -> Result<(StreamId, Reader<Ext<ArcReliableFrameDeque<ReliableFrame>>>), Error>
pub fn unreliable_reader(&self) -> Result<Result<DatagramReader, Error>, Error>
👎Deprecated
pub async fn unreliable_writer( &self, ) -> Result<Result<DatagramWriter, Error>, Error>
👎Deprecated
pub fn add_path( &self, bind_uri: BindUri, link: Link, pathway: Pathway, ) -> Result<(), CreatePathFailure>
pub fn del_path(&self, pathway: &Pathway) -> Result<(), Error>
pub fn is_active(&self) -> bool
pub fn origin_dcid(&self) -> Result<ConnectionId, Error>
pub async fn handshaked(&self) -> bool
pub async fn terminated(&self)
pub async fn peer_certs(&self) -> Result<Option<Vec<u8>>, Error>
pub async fn server_name(&self) -> Result<String, Error>
pub async fn client_name(&self) -> Result<Option<String>, Error>
pub fn add_local_endpoint( &self, bind: BindUri, addr: EndpointAddr, ) -> Result<(), Error>
pub fn add_peer_endpoint( &self, bind: BindUri, addr: EndpointAddr, ) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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