Skip to main content

IpcError

Enum IpcError 

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

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§

Source§

impl Debug for IpcError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for IpcError

Source§

impl PartialEq for IpcError

Source§

fn eq(&self, other: &IpcError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for IpcError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.