Enum glommio::ResourceType[][src]

pub enum ResourceType<T> {
    Semaphore {
        requested: u64,
        available: u64,
    },
    RwLock,
    Channel(T),
    File(String),
    Gate,
}

Resource Type used for errors that WouldBlock and includes extra diagnostic data for richer error messages.

Variants

Semaphore

Semaphore resource that includes the requested and available shares as debugging metadata for the Semaphore type.

Show fields

Fields of Semaphore

requested: u64

Requested shares

available: u64

Available semaphore shares

RwLock

Lock variant for reporting errors from the RwLock type.

Channel(T)

Channel variant for reporting errors from local_channel and shared_channel channel types.

File(String)

File variant used for reporting errors for the Buffered (BufferedFile) and Direct (DmaFile) file I/O variants.

Gate

Gate variant used for reporting errors for the Gate type.

Trait Implementations

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

impl<T> Display for ResourceType<T>[src]

Note this is a tricky impl in the sense that you will not get the information you expect from just using this display impl on a value. On the other hand the display impl for the entire error will give correct results..

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for ResourceType<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> ToString for T where
    T: Display + ?Sized
[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.