Struct esp_idf_svc::sys::EspError
source · 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)>
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,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)