[][src]Struct adb_rs::Header

pub struct Header {
    pub command: u32,
    pub arg0: u32,
    pub arg1: u32,
    pub data_length: u32,
    pub data_crc32: u32,
    pub magic: u32,
}

Fields

command: u32arg0: u32arg1: u32data_length: u32data_crc32: u32magic: u32

Methods

impl Header[src]

pub fn new(command: Command) -> HeaderBuilder[src]

pub fn get_command(&self) -> AdbResult<Command>[src]

pub fn encode<W>(&self, w: &mut W) -> AdbResult<()> where
    W: Write
[src]

pub fn decode<R>(r: &mut R) -> AdbResult<Self> where
    R: Read
[src]

pub fn decode_command<R>(r: &mut R, cmd: Command) -> AdbResult<Self> where
    R: Read
[src]

pub fn decode_data<R>(&self, r: &mut R) -> AdbResult<Vec<u8>> where
    R: Read
[src]

Trait Implementations

impl Default for Header[src]

impl Debug for Header[src]

Auto Trait Implementations

impl Send for Header

impl Sync for Header

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.