fn pack(&self) -> Result<Vec<u8>, Error> {
    // think that request will be u32 and sync u64
    let mut buf: Vec<u8> = Vec::with_capacity(18);

    write_map_len(&mut buf, 2)?;

    write_uint(&mut buf, Field::RequestType.to_u64().unwrap())?;
    write_uint(&mut buf, self.request.to_u64().unwrap())?;

    write_uint(&mut buf, Field::Sync.to_u64().unwrap())?;
    write_uint(&mut buf, self.sync)?;

    Ok(buf)
  }
/// Allows you to pack header.
Allows you to pack header.
Allows you to pack header .
fn pack(&self) -> Result<Vec<u8>, Error> {
    // think that request will be u32 and sync u64
    let mut buf: Vec<u8> = Vec::with_capacity(18);
    write_map_len(&mut buf, 2)?;
    write_uint(&mut buf, Field::RequestType.to_u64().unwrap())?;
    write_uint(&mut buf, self.request.to_u64().unwrap())?;
    write_uint(&mut buf, Field::Sync.to_u64().unwrap())?;
    write_uint(&mut buf, self.sync)?;
    Ok(buf)
  }
fn pack ( & self ) -> Result < Vec < u8 > , Error > { // think that request will be u32 and sync u64 let mut buf : Vec < u8 > = Vec :: with_capacity ( 18 ) ; write_map_len ( & mut buf , 2 ) ? ; write_uint ( & mut buf , Field :: RequestType . to_u64 ( ) . unwrap ( ) ) ? ; write_uint ( & mut buf , self . request . to_u64 ( ) . unwrap ( ) ) ? ; write_uint ( & mut buf , Field :: Sync . to_u64 ( ) . unwrap ( ) ) ? ; write_uint ( & mut buf , self . sync ) ? ; Ok ( buf ) }
Allows you to pack header.
Allows you to pack header .
&self
&self