pub struct Writer<S: SendStream, V> { /* private fields */ }Implementations§
Source§impl<S: SendStream, V> Writer<S, V>
impl<S: SendStream, V> Writer<S, V>
pub fn new(stream: S, version: V) -> Self
pub async fn encode<T: Encode<V> + Debug>(
&mut self,
msg: &T,
) -> Result<(), Error>where
V: Clone,
pub async fn write_all<Buf: Buf + Send>( &mut self, buf: &mut Buf, ) -> Result<(), Error>
Sourcepub fn finish(&mut self) -> Result<(), Error>
pub fn finish(&mut self) -> Result<(), Error>
A clean termination of the stream, waiting for the peer to close.
pub fn abort(&mut self, err: &Error)
pub async fn closed(&mut self) -> Result<(), Error>
pub fn set_priority(&mut self, priority: u8)
pub fn with_version<O>(self, version: O) -> Writer<S, O>
Trait Implementations§
Auto Trait Implementations§
impl<S, V> Freeze for Writer<S, V>
impl<S, V> RefUnwindSafe for Writer<S, V>where
V: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, V> Send for Writer<S, V>where
V: Send,
impl<S, V> Sync for Writer<S, V>
impl<S, V> Unpin for Writer<S, V>
impl<S, V> UnwindSafe for Writer<S, V>where
V: UnwindSafe,
S: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more