Error

Enum Error 

Source
pub enum Error<NetworkError> {
Show 14 variants Rng, NotConnected, AlreadyConnected, Uri, Busy, Impossible, Forbidden, NoData, Reset, Timeout, OutOfMemory, MessageType, Network(NetworkError), MessageError(Error),
}
Expand description

Endpoint Error

This error type only covers things that went wrong on our side and that the endpoint could not possibly handle in any meaningful way. For example, ill-formatted messages, messages arriving at the wrong time, messages which lack context or CoAP protocol timeouts are expected, handled automatically by the endpoint and only generate an “event” instead.

Variants§

§

Rng

Could not get random number from given PRNG

§

NotConnected

Endpoint is not connected

§

AlreadyConnected

Endpoint is already connected

§

Uri

Error while parsing the URI

§

Busy

There is already an operation ongoing

§

Impossible

Something really weird went wrong

§

Forbidden

The method that was called is not available in the current state

§

NoData

No data received

§

Reset

Reset received

§

Timeout

Timeout during operation

§

OutOfMemory

Out of Memory

§

MessageType

Wrong message type was given

§

Network(NetworkError)

Network error from underlying UDP Stack

§

MessageError(Error)

Error from message module

Trait Implementations§

Source§

impl<NetworkError: Debug> Debug for Error<NetworkError>

Source§

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

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

impl<E> From<Error> for Error<E>

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<NetworkError> Freeze for Error<NetworkError>
where NetworkError: Freeze,

§

impl<NetworkError> RefUnwindSafe for Error<NetworkError>
where NetworkError: RefUnwindSafe,

§

impl<NetworkError> Send for Error<NetworkError>
where NetworkError: Send,

§

impl<NetworkError> Sync for Error<NetworkError>
where NetworkError: Sync,

§

impl<NetworkError> Unpin for Error<NetworkError>
where NetworkError: Unpin,

§

impl<NetworkError> UnwindSafe for Error<NetworkError>
where NetworkError: UnwindSafe,

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.