pub struct EspError(/* private fields */);Expand description
Implementations§
Source§impl EspError
 
impl EspError
Sourcepub const fn from_non_zero(error: NonZero<i32>) -> EspError
 
pub const fn from_non_zero(error: NonZero<i32>) -> EspError
Wrap a [NonZeroI32]. Since ESP_OK is 0, this can never fail;
Sourcepub const fn from_infallible<const E: i32>() -> EspError
 
pub const fn from_infallible<const E: i32>() -> EspError
Sourcepub fn check_and_return<T>(error: i32, value: T) -> Result<T, EspError>
 
pub fn check_and_return<T>(error: i32, value: T) -> Result<T, EspError>
Convert error into a [Result] with Ok(value) if no error occurred.
If error is ESP_OK return [Ok] of value otherwise return [Err] of
wrapped error.
Trait Implementations§
Source§impl Error for EspError
 
impl Error for EspError
1.30.0§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§fn description(&self) -> &str
 
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<EspError> for Can02Error
 
impl From<EspError> for Can02Error
Source§fn from(e: EspError) -> Can02Error
 
fn from(e: EspError) -> Can02Error
Converts to this type from the input type.
Source§impl From<EspError> for EspIOError
 
impl From<EspError> for EspIOError
Source§fn from(e: EspError) -> EspIOError
 
fn from(e: EspError) -> EspIOError
Converts to this type from the input type.
Source§impl From<EspError> for SerialError
 
impl From<EspError> for SerialError
Source§fn from(e: EspError) -> SerialError
 
fn from(e: EspError) -> SerialError
Converts to this type from the input type.
impl Copy for EspError
impl Eq for EspError
impl StructuralPartialEq for EspError
Auto Trait Implementations§
impl Freeze for EspError
impl RefUnwindSafe for EspError
impl Send for EspError
impl Sync for EspError
impl Unpin for EspError
impl UnwindSafe for EspError
Blanket Implementations§
§impl<T> Any for Twhere
    T: 'static + ?Sized,
 
impl<T> Any for Twhere
    T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
    T: ?Sized,
 
impl<T> Borrow<T> for Twhere
    T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
 
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)