Skip to main content

PowerlinkError

Enum PowerlinkError 

Source
pub enum PowerlinkError {
Show 21 variants BufferTooShort, IoError, InvalidEthernetFrame, InvalidPlFrame, InvalidMessageType(u8), InvalidNmtState(u8), InvalidServiceId(u8), InvalidRequestedServiceId(u8), InvalidNodeId(u8), InvalidPayloadSize(u16), InvalidEnumValue, SliceConversion, FrameTooLarge, NotReady, ObjectNotFound, SubObjectNotFound, TypeMismatch, StorageError(&'static str), ValidationError(&'static str), SdoSequenceError, SdoAborted,
}
Expand description

Defines a portable, descriptive Error type for the POWERLINK stack.

Variants§

§

BufferTooShort

The provided buffer is too small for the operation.

§

IoError

An underlying I/O error occurred.

§

InvalidEthernetFrame

A received frame is fundamentally invalid (e.g., wrong EtherType, bad message type).

§

InvalidPlFrame

A received powerlink frame is fundamentally invalid (e.g., too short to contain required headers).

§

InvalidMessageType(u8)

A value in the frame is not a valid MessageType.

§

InvalidNmtState(u8)

A value in the frame is not a valid NMT State.

§

InvalidServiceId(u8)

A value in the frame is not a valid ServiceId.

§

InvalidRequestedServiceId(u8)

A value in the frame is not a valid RequestedServiceId.

§

InvalidNodeId(u8)

A value in the frame is not a valid NodeId.

§

InvalidPayloadSize(u16)

A value in the frame is not a valid PayloadSize.

§

InvalidEnumValue

A value in a frame is not a valid enum variant.

§

SliceConversion

A multi-byte value could not be parsed from a slice.

§

FrameTooLarge

The frame size exceeds the maximum physical or configured MTU.

§

NotReady

The device is not yet configured or ready to transmit/receive.

§

ObjectNotFound

The requested Object Dictionary index does not exist.

§

SubObjectNotFound

The requested sub-index does not exist for the given object.

§

TypeMismatch

An attempt was made to write a value with an incorrect data type to an object.

§

StorageError(&'static str)

An error occurred in the storage backend.

§

ValidationError(&'static str)

A mandatory object was missing from the Object Dictionary during validation.

§

SdoSequenceError

SDO Sequence number was unexpected (e.g., a lost frame was detected).

§

SdoAborted

SDO command layer received an abort message.

Trait Implementations§

Source§

impl Clone for PowerlinkError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PowerlinkError

Source§

impl Debug for PowerlinkError

Source§

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

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

impl Display for PowerlinkError

Source§

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

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

impl Eq for PowerlinkError

Source§

impl From<&'static str> for PowerlinkError

Source§

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

Converts to this type from the input type.
Source§

impl From<InvalidMessageTypeError> for PowerlinkError

Source§

fn from(_: InvalidMessageTypeError) -> Self

Converts to this type from the input type.
Source§

impl From<NodeIdError> for PowerlinkError

Source§

fn from(err: NodeIdError) -> Self

Converts to this type from the input type.
Source§

impl From<PayloadSizeError> for PowerlinkError

Source§

fn from(err: PayloadSizeError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromSliceError> for PowerlinkError

Source§

fn from(_: TryFromSliceError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for PowerlinkError

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PowerlinkError

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.