Enum OperationError
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§
§impl OperationError
impl OperationError
pub fn from_primitive(prim: u32) -> Option<OperationError>
pub fn from_primitive_allow_unknown(prim: u32) -> OperationError
pub fn unknown() -> OperationError
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
§impl Clone for OperationError
impl Clone for OperationError
§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 more§impl Debug for OperationError
impl Debug for OperationError
§impl<D> Decode<OperationError, D> for OperationErrorwhere
D: ResourceDialect,
impl<D> Decode<OperationError, D> for OperationErrorwhere
D: ResourceDialect,
§fn new_empty() -> OperationError
fn new_empty() -> OperationError
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<OperationError, D> for OperationErrorwhere
D: ResourceDialect,
impl<D> Encode<OperationError, D> for OperationErrorwhere
D: ResourceDialect,
§impl Hash for OperationError
impl Hash for OperationError
§impl Ord for OperationError
impl Ord for OperationError
§impl PartialEq for OperationError
impl PartialEq for OperationError
§impl PartialOrd for OperationError
impl PartialOrd for OperationError
§impl TypeMarker for OperationError
impl TypeMarker for OperationError
§type Owned = OperationError
type Owned = OperationError
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§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 more§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.§impl ValueTypeMarker for OperationError
impl ValueTypeMarker for OperationError
§type Borrowed<'a> = OperationError
type Borrowed<'a> = OperationError
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<OperationError as TypeMarker>::Owned,
) -> <OperationError as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<OperationError as TypeMarker>::Owned, ) -> <OperationError as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.