[][src]Trait scsi::BufferPushable

pub trait BufferPushable {
    fn push_to_buffer<T: AsMut<[u8]>>(
        &self,
        buffer: T
    ) -> Result<usize, ScsiError>; }

Allows a struct to serialize itself to a raw byte buffer.

Required methods

fn push_to_buffer<T: AsMut<[u8]>>(&self, buffer: T) -> Result<usize, ScsiError>

Serializes self to a raw byte slice.

Returns the number of bytes written on succes.

#Errors

Can return a BufferTooSmall error when the length of buffer is not large enough to serialize to.

Loading content...

Implementors

impl BufferPushable for CommandBlockWrapper[src]

impl BufferPushable for CommandStatusWrapper[src]

impl BufferPushable for InquiryCommand[src]

impl BufferPushable for InquiryResponse[src]

impl BufferPushable for Read10Command[src]

impl BufferPushable for ReadCapacityCommand[src]

impl BufferPushable for ReadCapacityResponse[src]

impl BufferPushable for RequestSenseCommand[src]

impl BufferPushable for TestUnitReady[src]

impl BufferPushable for Write10Command[src]

Loading content...