Skip to main content

ErrorKind

Enum ErrorKind 

Source
pub enum ErrorKind {
Show 23 variants SacnParsePackError(ErrorKind), Io(Error), Str(Utf8Error), Uuid(ParseError), Msg(String), MalformedSourceName(String), InvalidPriority(String), SourcesExceededError(String), SourceDiscovered(String), ExceedUniverseCapacity(String), IllegalUniverse(String), UniverseNotRegistered(String), IpVersionError(String), UnsupportedIpVersion(String), SenderAlreadyTerminated(String), DmxMergeError(String), OutOfSequence(String), UniverseTerminated(Uuid, u16), UniverseTimeout(Uuid, u16), UniverseNotFound(String), SourceNotFound(String), OsOperationUnsupported(String), SourceCorrupt(String), // some variants omitted
}
Expand description

The kind of an error.

Variants§

§

SacnParsePackError(ErrorKind)

§

Io(Error)

§

Str(Utf8Error)

§

Uuid(ParseError)

§

Msg(String)

A convenient variant for String.

§

MalformedSourceName(String)

Returned to indicate that an invalid or malformed source name was used.

§Arguments

msg: A string describing why the source name is malformed.

§

InvalidPriority(String)

Attempted to perform an action using a priority value that is invalid. For example sending with a priority > 200. This is distinct from the SacnParsePackError(ParseInvalidPriority) as it is for a local use of an invalid priority rather than receiving an invalid priority from another source.

§Arguments

msg: A string describing why the priority is invalid.

§

SourcesExceededError(String)

Used to indicate that the limit for the number of supported sources has been reached. This is based on unique CID values. as per ANSI E1.31-2018 Section 6.2.3.3.

§Arguments

msg: A string describing why the sources exceeded error was returned.

§

SourceDiscovered(String)

A source was discovered by a receiver with the announce_discovery_flag set to true.

§Arguments

source_name: The name of the source discovered.

§

ExceedUniverseCapacity(String)

Attempted to exceed the capacity of a single universe (packet::UNIVERSE_CHANNEL_CAPACITY).

§Arguments

msg: A string describing why/how the universe capacity was exceeded.

§

IllegalUniverse(String)

Attempted to use illegal universe, outwith allowed range of [E131_MIN_MULTICAST_UNIVERSE, E131_MAX_MULTICAST_UNIVERSE]

  • E131_DISCOVERY_UNIVERSE inclusive

§Arguments

msg: A string describing why/how the universe is an illegal universe.

§

UniverseNotRegistered(String)

Attempted to use a universe that wasn’t first registered for use. To send from a universe with a sender it must first be registered. This allows universe discovery adverts to include the universe.

§Arguments

msg: A string describing why the error was returned.

§

IpVersionError(String)

Ip version (ipv4 or ipv6) used when the other is expected.

§Arguments

msg: A string describing the situation where the wrong IpVersion was encountered.

§

UnsupportedIpVersion(String)

Attempted to use an unsupported (not Ipv4 or Ipv6) IP version.

§Arguments

msg: A string describing the situation where an unsupported IP version is used.

§

SenderAlreadyTerminated(String)

Attempted to use a sender which has already been terminated.

§Arguments

msg: A string describing why the error was returned.

§

DmxMergeError(String)

An error was encountered when attempting to merge DMX data together.

§Arguments

msg: A string describing why the error was returned.

§

OutOfSequence(String)

Packet was received out of sequence and so should be discarded.

§Arguments

msg: A string describing why the error was returned.

§

UniverseTerminated(Uuid, u16)

A source terminated a universe and this was detected when trying to receive data. This is only returned if the announce_stream_termination flag is set to true (default false).

§Arguments

src_cid: The CID of the source which sent the termination packet.

uni: The universe that the termination packet is for.

§

UniverseTimeout(Uuid, u16)

A source universe timed out as no data was received on that universe within E131_NETWORK_DATA_LOSS_TIMEOUT as per ANSI E1.31-2018 Section 6.7.1.

§Arguments

src_cid: The CID of the source which timed out.

uni: The universe that timed out.

§

UniverseNotFound(String)

When looking for a specific universe it wasn’t found. This might happen for example if trying to mute a universe on a receiver that wasn’t being listened to.

§Arguments

msg: A message describing why this error was returned.

§

SourceNotFound(String)

Attempted to find a source and failed. This might happen on a receiver for example if trying to remove a source which was never registered or discovered.

§Arguments

msg: A message describing why this error was returned / when the source was not found.

§

OsOperationUnsupported(String)

Thrown to indicate that the operation attempted is unsupported on the current OS For example this is used to indicate that multicast-IPv6 isn’t supported current on Windows.

§Arguments

msg: A message describing why this error was returned / the operation that was not supported.

§

SourceCorrupt(String)

Thrown to indicate that the source has corrupted for the reason specified by the error chain. This is currently only thrown if the source mutex is poisoned by a thread with access panic-ing. This prevents the panic propagating to the user of this library and allows them to handle it appropriately such as by creating a new source.

§Arguments

msg: A message providing further details (if any) as to why the SourceCorrupt error was returned.

Implementations§

Source§

impl ErrorKind

Source

pub fn description(&self) -> &str

A string describing the error kind.

Trait Implementations§

Source§

impl Debug for ErrorKind

Source§

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

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

impl Display for ErrorKind

Source§

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

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

impl<'a> From<&'a str> for ErrorKind

Source§

fn from(s: &'a str) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ErrorKind

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorKind> for Error

Source§

fn from(e: ErrorKind) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorKind> for ErrorKind

Source§

fn from(e: ErrorKind) -> Self

Converts to this type from the input type.
Source§

impl From<String> for ErrorKind

Source§

fn from(s: String) -> Self

Converts to this type from the input type.

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.