[][src]Struct netlink_packet_core::error::ErrorBuffer

pub struct ErrorBuffer<T> { /* fields omitted */ }

Implementations

impl<T: AsRef<[u8]>> ErrorBuffer<T>[src]

pub fn new(buffer: T) -> ErrorBuffer<T>[src]

pub fn into_inner(self) -> T[src]

Consume the packet, returning the underlying buffer.

pub fn new_checked(buffer: T) -> Result<Self, DecodeError>[src]

pub fn code(&self) -> i32[src]

Return the error code

impl<'a, T: AsRef<[u8]> + ?Sized> ErrorBuffer<&'a T>[src]

pub fn payload(&self) -> &'a [u8][src]

Return a pointer to the payload.

impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> ErrorBuffer<&'a mut T>[src]

pub fn payload_mut(&mut self) -> &mut [u8][src]

Return a mutable pointer to the payload.

impl<T: AsRef<[u8]> + AsMut<[u8]>> ErrorBuffer<T>[src]

pub fn set_code(&mut self, value: i32)[src]

set the error code field

Trait Implementations

impl<T: Clone> Clone for ErrorBuffer<T>[src]

impl<T: Debug> Debug for ErrorBuffer<T>[src]

impl<T: Eq> Eq for ErrorBuffer<T>[src]

impl<'buffer, T: AsRef<[u8]> + 'buffer> Parseable<ErrorBuffer<&'buffer T>> for ErrorMessage[src]

impl<T: PartialEq> PartialEq<ErrorBuffer<T>> for ErrorBuffer<T>[src]

impl<T> StructuralEq for ErrorBuffer<T>[src]

impl<T> StructuralPartialEq for ErrorBuffer<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for ErrorBuffer<T> where
    T: RefUnwindSafe

impl<T> Send for ErrorBuffer<T> where
    T: Send

impl<T> Sync for ErrorBuffer<T> where
    T: Sync

impl<T> Unpin for ErrorBuffer<T> where
    T: Unpin

impl<T> UnwindSafe for ErrorBuffer<T> where
    T: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.