fn send_disconnect<T,U>(&mut self, e: OssuaryError,
                            mut buf: T) -> Result<(usize, ConnectionState), OssuaryError>
    where T: std::ops::DerefMut<Target = U>,
          U: std::io::Write {
        // Tell remote host to disconnect
        let pkt: ResetPacket = match e {
            OssuaryError::ConnectionClosed => ResetPacket::closed(),
            _ => Default::default(),
        };
        let w = write_packet(self, buf.deref_mut(), struct_as_slice(&pkt),
                             PacketType::Disconnect)?;
        Ok((w, ConnectionState::Failed(e)))
    }
/// Ready to send a disconnect packet
Ready to send a disconnect packet
Ready to send a disconnect packet
fn send_disconnect<T,U>(&mut self, e: OssuaryError,
                            mut buf: T) -> Result<(usize, ConnectionState), OssuaryError>
    where T: std::ops::DerefMut<Target = U>,
          U: std::io::Write {
        // Tell remote host to disconnect
        let pkt: ResetPacket = match e {
            OssuaryError::ConnectionClosed => ResetPacket::closed(),
            _ => Default::default(),
        };
        let w = write_packet(self, buf.deref_mut(), struct_as_slice(&pkt),
                             PacketType::Disconnect)?;
        Ok((w, ConnectionState::Failed(e)))
    }
fn send_disconnect < T , U > ( & mut self , e : OssuaryError , mut buf : T ) -> Result < ( usize , ConnectionState ) , OssuaryError > where T : std :: ops :: DerefMut < Target = U > , U : std :: io :: Write { // Tell remote host to disconnect let pkt : ResetPacket = match e { OssuaryError :: ConnectionClosed => ResetPacket :: closed ( ) , _ => Default :: default ( ) , } ; let w = write_packet ( self , buf . deref_mut ( ) , struct_as_slice ( & pkt ) , PacketType :: Disconnect ) ? ; Ok ( ( w , ConnectionState :: Failed ( e ) ) ) }
Ready to send a disconnect packet
Ready to send a disconnect packet
&mut self
e
OssuaryError
buf
T
&mut self
e
OssuaryError
buf
T