[][src]Enum rttrust::RtError

pub enum RtError {
    Error,
    TimeOut,
    Full,
    Empty,
    NoMem,
    NoSys,
    Busy,
    IO,
    Intr,
    Inval,
    Unknown,
}

RT-Thread error code definitions

Variants

Error

A generic error happens

TimeOut

Timed out

Full

The resource is full

Empty

The resource is empty

NoMem

No memory

NoSys

No system

Busy

Busy

IO

IO error

Intr

Interrupted system call

Inval

Invalid argument

Unknown

Unknown error

Implementations

impl RtError[src]

pub fn from_code(err: rt_err_t) -> Option<Self>[src]

pub fn from_code_none<R>(err: rt_err_t, ok: R) -> Result<R>[src]

pub fn from_code_none_then<F, R>(err: rt_err_t, ok: F) -> Result<R> where
    F: FnOnce() -> R, 
[src]

pub fn to_code(&self) -> rt_err_t[src]

Trait Implementations

impl Debug for RtError[src]

Auto Trait Implementations

impl Send for RtError

impl Sync for RtError

impl Unpin for RtError

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, 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.