#[non_exhaustive]pub enum GigeError {
Io(Error),
Timeout,
GenCp(GenCpError),
Status(GigeStatus),
MalformedAck {
command: &'static str,
problem: &'static str,
},
AckLength {
command: &'static str,
expected: usize,
got: usize,
},
NotIpv4(&'static str),
PacketSize(u32),
}Expand description
Errors that can occur when operating the GVCP control path.
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.
Io(Error)
A socket operation failed.
Timeout
No acknowledgement arrived within the control timeout, retries included.
GenCp(GenCpError)
An acknowledgement’s header could not be decoded.
Status(GigeStatus)
The device answered with an error status, decoded with GigE Vision’s table (ADR-0020).
MalformedAck
An acknowledgement does not have the shape GVCP gives it.
Fields
AckLength
An acknowledgement carries another payload length than its command asked for.
Fields
NotIpv4(&'static str)
GigE Vision control runs over IPv4, and the address or interface given has none.
PacketSize(u32)
A GVSP packet size wider than GevSCPSPacketSize’s 16-bit field.
Trait Implementations§
Source§impl Error for GigeError
impl Error for GigeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<GenCpError> for GigeError
impl From<GenCpError> for GigeError
Source§fn from(source: GenCpError) -> Self
fn from(source: GenCpError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for GigeError
impl !UnwindSafe for GigeError
impl Freeze for GigeError
impl Send for GigeError
impl Sync for GigeError
impl Unpin for GigeError
impl UnsafeUnpin for GigeError
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
Mutably borrows from an owned value. Read more