pub struct MidServerWriter<'a, W, C> { /* private fields */ }
Implementations§
Source§impl<'a, W, C> MidServerWriter<'a, W, C>where
W: AsyncWriteExt + Unpin,
impl<'a, W, C> MidServerWriter<'a, W, C>where
W: AsyncWriteExt + Unpin,
Sourcepub fn write_connected(
&mut self,
id: u16,
) -> impl Future<Output = Result<()>> + '_
pub fn write_connected( &mut self, id: u16, ) -> impl Future<Output = Result<()>> + '_
Write connected packet
Sourcepub async fn write_server(&mut self, port: u16) -> Result<()>
pub async fn write_server(&mut self, port: u16) -> Result<()>
Writes port of the created server to the client.
Sourcepub async fn write_update_rights(&mut self, new_rights: u16) -> Result<()>
pub async fn write_update_rights(&mut self, new_rights: u16) -> Result<()>
Writes update rights
packet to the client.
Sourcepub async fn write_failure(
&mut self,
error: impl Into<ProtocolError>,
) -> Result<()>
pub async fn write_failure( &mut self, error: impl Into<ProtocolError>, ) -> Result<()>
Write failure packet to the client. Indicates that something was gone wrong.
Sourcepub async fn write_ping(
&mut self,
server_name: &str,
algorithm: CompressionAlgorithm,
buffer_size: u16,
) -> Result<()>
pub async fn write_ping( &mut self, server_name: &str, algorithm: CompressionAlgorithm, buffer_size: u16, ) -> Result<()>
Write ping response to the client.
Auto Trait Implementations§
impl<'a, W, C> Freeze for MidServerWriter<'a, W, C>
impl<'a, W, C> RefUnwindSafe for MidServerWriter<'a, W, C>where
W: RefUnwindSafe,
C: RefUnwindSafe,
impl<'a, W, C> Send for MidServerWriter<'a, W, C>
impl<'a, W, C> Sync for MidServerWriter<'a, W, C>
impl<'a, W, C> Unpin for MidServerWriter<'a, W, C>
impl<'a, W, C> !UnwindSafe for MidServerWriter<'a, W, C>
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