Skip to main content

ConfigError

Enum ConfigError 

Source
#[non_exhaustive]
pub enum ConfigError {
Show 21 variants ZeroBaudRate, TimingOverflow, MaxMasterOutOfRange { value: u8, }, StationExceedsMaxMaster { station: u8, max_master: u8, }, MaxInfoFramesOutOfRange { value: u8, }, FrameAbortOutOfRange { value: Duration, minimum: Duration, maximum: Duration, }, FrameGapTooLong { value: Duration, maximum: Duration, }, PostdriveTooLong { value: Duration, maximum: Duration, }, ReplyDelayTooLong { value: Duration, maximum: Duration, }, ReplyMarginTooLong { margin: Duration, reply_delay: Duration, }, ReplyTimeoutOutOfRange { value: Duration, minimum: Duration, maximum: Duration, }, TurnaroundTooShort { value: Duration, minimum: Duration, }, TurnaroundExceedsUsageDelay { turnaround: Duration, usage_delay: Duration, }, UsageDelayTooLong { value: Duration, maximum: Duration, }, UsageTimeoutOutOfRange { value: Duration, minimum: Duration, maximum: Duration, }, ZeroLocalDuration { field: LocalDurationField, }, ZeroLocalLimit { field: LocalLimitField, }, MultipleFrameRatioOutOfRange { value: u8, }, TransmitWatchdogTooShort { value: Duration, minimum: Duration, }, ExtendedStorageTooSmall { buffer: CoreBuffer, length: usize, minimum: usize, }, ReceiveStorageTooSmall { length: usize, minimum: usize, },
}
Expand description

A configuration value that violates a protocol or local safety bound.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ZeroBaudRate

A baud rate of zero cannot be used to derive bit-time limits.

§

TimingOverflow

A derived timing calculation overflowed its arithmetic.

§

MaxMasterOutOfRange

Max_Master is a seven-bit station address.

Fields

§value: u8

Supplied Max_Master value.

§

StationExceedsMaxMaster

This station cannot be beyond Max_Master.

Fields

§station: u8

Local station address.

§max_master: u8

Configured Max_Master value.

§

MaxInfoFramesOutOfRange

Max_Info_Frames must be in the inclusive 1..=255 range.

Fields

§value: u8

Supplied Max_Info_Frames value.

§

FrameAbortOutOfRange

T_frame_abort is outside the 60-bit-time through 100 ms range.

Fields

§value: Duration

Supplied frame-abort duration.

§minimum: Duration

Minimum permitted duration.

§maximum: Duration

Maximum permitted duration.

§

FrameGapTooLong

T_frame_gap is longer than 20 bit times.

Fields

§value: Duration

Supplied frame-gap duration.

§maximum: Duration

Maximum permitted duration.

§

PostdriveTooLong

T_postdrive is longer than 15 bit times.

Fields

§value: Duration

Supplied postdrive duration.

§maximum: Duration

Maximum permitted duration.

§

ReplyDelayTooLong

T_reply_delay cannot exceed 250 ms.

Fields

§value: Duration

Supplied reply-delay duration.

§maximum: Duration

Maximum permitted duration.

§

ReplyMarginTooLong

The reply transmit margin must leave part of T_reply_delay for the application to answer.

Fields

§margin: Duration

Supplied margin.

§reply_delay: Duration

Configured T_reply_delay.

§

ReplyTimeoutOutOfRange

T_reply_timeout must be between 255 and 300 ms.

Fields

§value: Duration

Supplied reply-timeout duration.

§minimum: Duration

Minimum permitted duration.

§maximum: Duration

Maximum permitted duration.

§

TurnaroundTooShort

T_turnaround must cover at least 40 bit times.

Fields

§value: Duration

Supplied turnaround duration.

§minimum: Duration

Minimum permitted duration.

§

TurnaroundExceedsUsageDelay

T_turnaround cannot exceed the maximum T_usage_delay response window.

Fields

§turnaround: Duration

Supplied turnaround duration.

§usage_delay: Duration

Configured usage-delay duration.

§

UsageDelayTooLong

T_usage_delay cannot exceed 15 ms.

Fields

§value: Duration

Supplied usage-delay duration.

§maximum: Duration

Maximum permitted duration.

§

UsageTimeoutOutOfRange

T_usage_timeout must be between 20 and 35 ms.

Fields

§value: Duration

Supplied usage-timeout duration.

§minimum: Duration

Minimum permitted duration.

§maximum: Duration

Maximum permitted duration.

§

ZeroLocalDuration

A local queue age or watchdog of zero would disable the safety bound.

Fields

§field: LocalDurationField

Local duration setting that was zero.

§

ZeroLocalLimit

A local scheduling ratio or starvation limit of zero is invalid.

Fields

§field: LocalLimitField

Local count or ratio setting that was zero.

§

MultipleFrameRatioOutOfRange

Multiple-frame ratio is a percentage and cannot exceed 100.

Fields

§value: u8

Supplied percentage value.

§

TransmitWatchdogTooShort

The transmit watchdog would abort the longest frame this configuration sends before the driver could go off: a standard frame of 511 octets takes 1.06 s at 4800 baud, and an extended one of 1516 octets 1.58 s at 9600. See MstpCoreConfig::minimum_transmit_watchdog; the baud-rate constructors and MstpCoreConfig::with_extended_frames set one that clears it.

Fields

§value: Duration

Supplied watchdog.

§minimum: Duration

The shortest watchdog accepted, MstpCoreConfig::minimum_transmit_watchdog.

§

ExtendedStorageTooSmall

MstpCoreConfig::extended_frames is on, but a buffer the core was given can’t hold the largest extended frame or NPDU. Only MasterCore::new and MasterCore::from_parts report it, since only they see the buffers.

Fields

§buffer: CoreBuffer

The buffer that is too small.

§length: usize

Its size in octets.

§minimum: usize

The size extended frames need: the longest extended frame on the wire for the receive storage and the transmit frame, the longest NPDU one carries for a delivery slot and a queue slot.

§

ReceiveStorageTooSmall

The receive storage the core was given can’t hold even the shortest frame. Only MasterCore::new and MasterCore::from_parts report it.

Fields

§length: usize

Supplied storage length.

Trait Implementations§

Source§

impl Clone for ConfigError

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 ConfigError

Source§

impl Debug for ConfigError

Source§

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

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

impl Display for ConfigError

Source§

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

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

impl Eq for ConfigError

Source§

impl Error for ConfigError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for ConfigError

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 ConfigError

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.