[][src]Trait scsi::BufferPullable

pub trait BufferPullable: Sized {
    fn pull_from_buffer<T: AsRef<[u8]>>(buffer: T) -> Result<Self, ScsiError>;
}

Allows for a struct to deserialize itself from a raw byte buffer.

Required methods

fn pull_from_buffer<T: AsRef<[u8]>>(buffer: T) -> Result<Self, ScsiError>

Deserializes an instance of T from a byte buffer.

#Errors

Can return a BufferTooSmall error when the length of buffer is not large enough to deserialize from, or a ParseError if the buffer cannot be deserialized into a valid instance of T using the bytes provided.

Loading content...

Implementors

impl BufferPullable for CommandBlockWrapper[src]

impl BufferPullable for CommandStatusWrapper[src]

impl BufferPullable for InquiryCommand[src]

impl BufferPullable for InquiryResponse[src]

impl BufferPullable for Read10Command[src]

impl BufferPullable for ReadCapacityCommand[src]

impl BufferPullable for ReadCapacityResponse[src]

impl BufferPullable for RequestSenseCommand[src]

impl BufferPullable for TestUnitReady[src]

impl BufferPullable for Write10Command[src]

Loading content...