pub struct TcpStreamWriteHalf { /* private fields */ }Expand description
Simple implementation of a TCP Stream Write Half
Can be used to write messages to the sink. If dropped this will close the connection on the TcpStreamReadHalf.
Implementations§
Source§impl TcpStreamWriteHalf
impl TcpStreamWriteHalf
Sourcepub fn new(
io: FramedWrite<WriteHalf<TokioTcpStream>, DoipCodec>,
config: Option<SocketConfig>,
) -> Self
pub fn new( io: FramedWrite<WriteHalf<TokioTcpStream>, DoipCodec>, config: Option<SocketConfig>, ) -> Self
Creates a new TCP Stream Read Half from an existing Tokio TCP Stream and config
Sourcepub async fn send<A: DoipTcpPayload + DoipPayload + 'static>(
&mut self,
payload: A,
) -> Result<(), SocketSendError>
pub async fn send<A: DoipTcpPayload + DoipPayload + 'static>( &mut self, payload: A, ) -> Result<(), SocketSendError>
Send a message to the sink
Auto Trait Implementations§
impl Freeze for TcpStreamWriteHalf
impl RefUnwindSafe for TcpStreamWriteHalf
impl Send for TcpStreamWriteHalf
impl Sync for TcpStreamWriteHalf
impl Unpin for TcpStreamWriteHalf
impl UnwindSafe for TcpStreamWriteHalf
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