Enum ruby_marshal::FromValueError
source · pub enum FromValueError {
Cycle {
handle: ValueHandle,
},
InvalidValueHandle {
handle: ValueHandle,
},
UnexpectedValueKind {
kind: ValueKind,
trace: Vec<ValueHandle>,
},
UnexpectedObjectName {
name: Vec<u8>,
},
UnexpectedUserDefinedName {
name: Vec<u8>,
},
DuplicateInstanceVariable {
name: Vec<u8>,
},
UnknownInstanceVariable {
name: Vec<u8>,
},
MissingInstanceVariable {
name: Vec<u8>,
},
DuplicateHashKey {
key: ValueHandle,
},
Other {
error: Box<dyn Error + Send + Sync + 'static>,
},
}
Expand description
An error that may occur while creating a type from a Ruby Value.
Variants§
Cycle
An already visited node was visited.
Fields
§
handle: ValueHandle
The already-visited node.
InvalidValueHandle
A given ValueHandle
was invalid.
Fields
§
handle: ValueHandle
The invalid handle
UnexpectedValueKind
An unexpected value kind was encountered.
Fields
§
trace: Vec<ValueHandle>
The current path of value handles
UnexpectedObjectName
An object name was unexpected.
UnexpectedUserDefinedName
A user defined value name was unexpected.
DuplicateInstanceVariable
An instance variable was duplicated
UnknownInstanceVariable
An unknown instance variable was encountered.
MissingInstanceVariable
Missing an instance variable with the given name.
DuplicateHashKey
A hash key was provided twice.
Fields
§
key: ValueHandle
The key that was provided twice.
This does not need to be a symbol.
Other
Another user-provided kind of error occured.
Implementations§
Trait Implementations§
source§impl Debug for FromValueError
impl Debug for FromValueError
source§impl Display for FromValueError
impl Display for FromValueError
source§impl Error for FromValueError
impl Error for FromValueError
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()
Auto Trait Implementations§
impl Freeze for FromValueError
impl !RefUnwindSafe for FromValueError
impl Send for FromValueError
impl Sync for FromValueError
impl Unpin for FromValueError
impl !UnwindSafe for FromValueError
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