#[non_exhaustive]pub enum ReadError {
Short {
needed: usize,
},
TooFewSamples {
needed: usize,
},
Contract(Contract),
Detached,
}Expand description
A read that failed.
One enum serves every read on every port, so a variant can be unreachable
for the method that returns it: TooFewSamples
belongs to CoherentSignals::read_coherent alone, and
Caller::reply never returns Contract. Each
method documents what it can return.
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.
Short
The output buffer is too short. Nothing was consumed.
TooFewSamples
samples has fewer entries than ords. Nothing was consumed.
Contract(Contract)
A contract error, such as an unknown interaction.
Detached
The runtime behind the port is gone.
Trait Implementations§
impl Copy for ReadError
impl Eq for ReadError
Source§impl From<ReadError> for ClientError
impl From<ReadError> for ClientError
Source§impl From<ReadError> for ProviderError
impl From<ReadError> for ProviderError
impl StructuralPartialEq for ReadError
Auto Trait Implementations§
impl Freeze for ReadError
impl RefUnwindSafe for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnsafeUnpin for ReadError
impl UnwindSafe for ReadError
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