[][src]Enum ipc_rs::IpcError

pub enum IpcError {
    FailedToDeserialize,
    QueueIsUninitialized,
    CouldntReadMessage,
    QueueAlreadyExists,
    FailedToSerialize,
    QueueDoesntExist,
    QueueWasRemoved,
    SignalReceived,
    InvalidMessage,
    InvalidCommand,
    MessageTooBig,
    InvalidStruct,
    TooManyQueues,
    AccessDenied,
    QueueFull,
    NoMessage,
    NoMemory,
    UnknownErrorValue(i32),
    UnknownReturnValue(i32),
}

An enum containing all possible IPC errors

Variants

FailedToDeserialize

Returned, when it wasn't possible to deserialize bytes into the desired types. That mostly occurs if MessageQueue is defined with the wrong type or the input got truncated

QueueIsUninitialized

Returned when an attempt was made to use a queue before the init() call was made

CouldntReadMessage

Returned, if it was impossible to read the Message structure. Occurs if you made the raw pointer too early and the underlying data got dropped already

QueueAlreadyExists

When the queue already exists, but IpcFlags::Exclusive and IpcFlags::CreateKey were both specified

FailedToSerialize

Occurs if it isn't possible to serialize a struct into bytes. Shouldn't normally occur, might indicate a bug in the CBOR library

QueueDoesntExist

IpcFlags::Exclusive was specified, but queue doesn't exist

QueueWasRemoved

The Queue has been removed (might be because the system ran out of memory)

SignalReceived

A signal was received

InvalidMessage

The message is invalid, occurs if the message struct does not follow the mtype-mtext forma

InvalidCommand

Returned when an invalid command was given to msgctl()

MessageTooBig

The message is bigger than either the system limit or the set limit

InvalidStruct

Invalid struct

This error is returned when msgctl() was called with a invalid pointer to a struct, which would be either msqid_ds or msginfo.test

TooManyQueues

There are too many MessageQueues already (shouldn't occur, the limit is pretty big)

AccessDenied

Access was denied, you are trying to read a queue that doesn't belong to you or your process

QueueFull

The queue is full, 'nuff said

NoMessage

There is no message. This isn't an error, per se, but the intended return value of nonblocking recv() calls

NoMemory

There is not enough space left in the queue. This isn't really an error either, it is what is returned by a nonblocking send() call

UnknownErrorValue(i32)

We know it was an error, but it was something non-standard

UnknownReturnValue(i32)

one of the standard functions returned a value it should never return. (for example msgsnd() returning 5)

Trait Implementations

impl PartialEq<IpcError> for IpcError[src]

impl Eq for IpcError[src]

impl Debug for IpcError[src]

Auto Trait Implementations

Blanket Implementations

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.

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

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

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