#[repr(i32)]pub enum Error {
Unspecified = 1,
OutboundFrameTooLarge = 2,
InboundFrameTooLarge = 3,
InboundFrameCorrupt = 4,
IoError = 5,
Closed = 6,
}
Variants§
Unspecified = 1
An unspecified error has occurred. This error type should be avoided unless the use of a more specific error would be misleading.
If this error is emitted, it is expected that a more descriptive error will be present in the logs.
Run-time Remediation: Close and re-open the device and attempt to use it. If the error persists, indicate trouble to a higher level and stop.
OutboundFrameTooLarge = 2
SendFrame()
was called with a frame that was larger than what
GetMaxFrameSize()
indicated to be the maximum frame size.
Note that MAX_FRAME_SIZE
indicates the largest frame size supported
by this protocol, whereas GetMaxFrameSize()
returns the largest
frame size supported by the Device.
This error typically indicates a bug or logic-error in the use of the
fuchsia.lowpan.spinel::Device
protocol.
This error is only emitted via ->OnError()
.
InboundFrameTooLarge = 3
The remote device tried to send us a frame that was too large.
This error typically indicates either frame corruption or a misconfiguration of some sort.
Run-time Remediation: The device should be reset and re-initialized.
This error is only emitted via ->OnError()
.
InboundFrameCorrupt = 4
Garbage-bytes/corruption detected on inbound frame.
This error typically indicates that the connection between the host and the Spinel device is unreliable. This may be caused by hardware problems or implementation bugs.
Run-time Remediation: The device should be reset (by sending a spinel reset frame or by closing and re-opening) and then re-initialized.
This error is only emitted via ->OnError()
.
IoError = 5
An I/O error has occurred.
When this error is encountered, the device automatically closes.
Run-time Remediation: Re-open the device and attempt to use it. If the error persists, indicate trouble to a higher level (for example, presenting a UI message indicating a malfunction) and stop.
Closed = 6
This operation cannot be performed while the Spinel device is closed.
This error typically indicates a bug or logic-error in the use of the
fuchsia.lowpan.spinel::Device
protocol.
This error is only emitted via ->OnError()
.
Implementations§
Source§impl Error
impl Error
pub fn from_primitive(prim: i32) -> Option<Self>
pub const fn into_primitive(self) -> i32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Error, D> for Error
impl<D: ResourceDialect> Decode<Error, D> for Error
Source§impl Ord for Error
impl Ord for Error
Source§impl PartialOrd for Error
impl PartialOrd for Error
Source§impl TypeMarker for Error
impl TypeMarker for Error
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for Error
impl ValueTypeMarker for Error
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)