pub enum OperationError {
Invalid,
Failed,
Unsupported,
// some variants omitted
}
Expand description
Fuchsia test harness operation error type.
A harness is responsible for maintaining the state for a particular test run. This type is returned when an operation fails.
Variants§
Invalid
The requested operation is invalid.
This is returned when a test case asked the harness to do something incompatible with the harness’ current state. This error signifies a bug in the test code itself.
Returning this value MUST fail the corresponding test.
Example: Test asked for the size of a file before it was created.
Failed
The requested operation failed.
This is returned when the test harness failed to complete an operation, even though the current state should have permitted the operation to work. This error signifies a bug in a dependency of the harness.
Returning this value MUST fail the corresponding test.
Example: Test asked for the size of a file after it was created, but the query failed.
Unsupported
The requested operation is not supported by this harness.
This is returned when the test harness does not support the requested operation. This is not necessarily a fatal error, it is used to signify that the harness has knowledge of what was requested, but it does not implement the behavior.
Returning this value MAY fail the corresponding test, but it does not need to. This return value is useful to determine compatibility with different feature sets or versions.
Example: Test asked for the size of a file, but the ability to check file sizes was removed in the previous component version.
Implementations§
Source§impl OperationError
impl OperationError
pub fn from_primitive(prim: u32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for OperationError
impl Clone for OperationError
Source§fn clone(&self) -> OperationError
fn clone(&self) -> OperationError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OperationError
impl Debug for OperationError
Source§impl<D: ResourceDialect> Decode<OperationError, D> for OperationError
impl<D: ResourceDialect> Decode<OperationError, D> for OperationError
Source§impl<D: ResourceDialect> Encode<OperationError, D> for OperationError
impl<D: ResourceDialect> Encode<OperationError, D> for OperationError
Source§impl Hash for OperationError
impl Hash for OperationError
Source§impl Ord for OperationError
impl Ord for OperationError
Source§fn cmp(&self, other: &OperationError) -> Ordering
fn cmp(&self, other: &OperationError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for OperationError
impl PartialEq for OperationError
Source§impl PartialOrd for OperationError
impl PartialOrd for OperationError
Source§impl TypeMarker for OperationError
impl TypeMarker for OperationError
Source§type Owned = OperationError
type Owned = OperationError
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 OperationError
impl ValueTypeMarker for OperationError
Source§type Borrowed<'a> = OperationError
type Borrowed<'a> = OperationError
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for OperationError
impl Eq for OperationError
impl StructuralPartialEq for OperationError
Auto Trait Implementations§
impl Freeze for OperationError
impl RefUnwindSafe for OperationError
impl Send for OperationError
impl Sync for OperationError
impl Unpin for OperationError
impl UnwindSafe for OperationError
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
)