pub enum BridgeError {
NotFound,
InvalidArgument,
ReadOnly,
Internal,
AbiMismatch,
}Expand description
Failure of an SDK call into CCF.
Conversion to EndpointError, as by ? in a handler, always gives
HTTP 500.
Variants§
NotFound
A value was not found. Lookups report this as None or false instead.
InvalidArgument
CCF rejected an argument, such as an empty map name, an unknown status or an invalid header.
ReadOnly
A write was attempted in a read-only transaction.
Internal
CCF failed the operation, or returned invalid UTF-8 where a string was expected.
AbiMismatch
The SDK and CCF were built with different ABI versions.
Trait Implementations§
Source§impl Clone for BridgeError
impl Clone for BridgeError
Source§fn clone(&self) -> BridgeError
fn clone(&self) -> BridgeError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BridgeError
impl Debug for BridgeError
Source§impl From<BridgeError> for EndpointError
Convert to an HTTP 500 InternalError, so that ? can be used in handlers.
impl From<BridgeError> for EndpointError
Convert to an HTTP 500 InternalError, so that ? can be used in handlers.
use ccf_app::{BridgeError, EndpointError};
let error = EndpointError::from(BridgeError::InvalidArgument);
assert_eq!(error.status, 500);
assert_eq!(error.message, "CCF bridge error: InvalidArgument");Source§fn from(error: BridgeError) -> Self
fn from(error: BridgeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BridgeError
impl PartialEq for BridgeError
impl Copy for BridgeError
impl Eq for BridgeError
impl StructuralPartialEq for BridgeError
Auto Trait Implementations§
impl Freeze for BridgeError
impl RefUnwindSafe for BridgeError
impl Send for BridgeError
impl Sync for BridgeError
impl Unpin for BridgeError
impl UnsafeUnpin for BridgeError
impl UnwindSafe for BridgeError
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