pub struct RustyCotpConnection<R: TpktReader, W: TpktWriter> { /* private fields */ }Expand description
A COTP connection provides a packet based data exchange mechanism.
Initiator connections may be initiated via this struct. To act as a responder, the acceptor class should be used.
Implementations§
Source§impl<R: TpktReader, W: TpktWriter> RustyCotpConnection<R, W>
impl<R: TpktReader, W: TpktWriter> RustyCotpConnection<R, W>
Sourcepub async fn initiate(
connection: impl TpktConnection,
options: CotpProtocolInformation,
connection_options: CotpConnectionParameters,
) -> Result<RustyCotpConnection<impl TpktReader, impl TpktWriter>, CotpError>
pub async fn initiate( connection: impl TpktConnection, options: CotpProtocolInformation, connection_options: CotpConnectionParameters, ) -> Result<RustyCotpConnection<impl TpktReader, impl TpktWriter>, CotpError>
Initiates a connection to a responder COTP service.
Trait Implementations§
Source§impl<R: TpktReader, W: TpktWriter> CotpConnection for RustyCotpConnection<R, W>
impl<R: TpktReader, W: TpktWriter> CotpConnection for RustyCotpConnection<R, W>
Source§fn get_protocol_infomation_list(&self) -> &Vec<Box<dyn ProtocolInformation>>
fn get_protocol_infomation_list(&self) -> &Vec<Box<dyn ProtocolInformation>>
Gets the information regarding the protocols that have been negotiated during the connect phase.
Source§async fn split(self) -> Result<(impl CotpReader, impl CotpWriter), CotpError>
async fn split(self) -> Result<(impl CotpReader, impl CotpWriter), CotpError>
Splits a connection into reader and writer components. This must be done before the connection is used.
Auto Trait Implementations§
impl<R, W> Freeze for RustyCotpConnection<R, W>
impl<R, W> !RefUnwindSafe for RustyCotpConnection<R, W>
impl<R, W> Send for RustyCotpConnection<R, W>
impl<R, W> !Sync for RustyCotpConnection<R, W>
impl<R, W> Unpin for RustyCotpConnection<R, W>
impl<R, W> UnsafeUnpin for RustyCotpConnection<R, W>where
R: UnsafeUnpin,
W: UnsafeUnpin,
impl<R, W> !UnwindSafe for RustyCotpConnection<R, W>
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