Enum uclicious::raw::object::ObjectError
source · pub enum ObjectError {
KeyNotFound(String),
WrongType {
key: String,
actual_type: ucl_type_t,
wanted_type: ucl_type_t,
},
IntConversionError(TryFromIntError),
AddrParseError(AddrParseError),
Other(String),
None,
}
Expand description
Errors that could be returned by Object
or ObjectRef
functions.
Variants§
KeyNotFound(String)
WrongType
Object was found, but value type doesn’t match the desired type.
NOTE: Error only returned when conversion is done by FromObject
trait. Built-in functions return None
.
IntConversionError(TryFromIntError)
Wrapper around TryFromIntError
.
AddrParseError(AddrParseError)
Wrapper around AddrParseError
.
Other(String)
An error that we couldn’t match to internal type.
None
Not an error, but required for some conversions.
Implementations§
source§impl ObjectError
impl ObjectError
Trait Implementations§
source§impl Clone for ObjectError
impl Clone for ObjectError
source§fn clone(&self) -> ObjectError
fn clone(&self) -> ObjectError
Returns a copy 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 ObjectError
impl Debug for ObjectError
source§impl Display for ObjectError
impl Display for ObjectError
source§impl Error for ObjectError
impl Error for ObjectError
1.30.0 · source§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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<AddrParseError> for ObjectError
impl From<AddrParseError> for ObjectError
source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Converts to this type from the input type.
source§impl From<Infallible> for ObjectError
impl From<Infallible> for ObjectError
source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
source§impl From<TryFromIntError> for ObjectError
impl From<TryFromIntError> for ObjectError
source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Converts to this type from the input type.
source§impl PartialEq<ObjectError> for ObjectError
impl PartialEq<ObjectError> for ObjectError
source§fn eq(&self, other: &ObjectError) -> bool
fn eq(&self, other: &ObjectError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ObjectError
impl StructuralEq for ObjectError
impl StructuralPartialEq for ObjectError
Auto Trait Implementations§
impl RefUnwindSafe for ObjectError
impl Send for ObjectError
impl Sync for ObjectError
impl Unpin for ObjectError
impl UnwindSafe for ObjectError
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