pub enum Error {
Failed {
offset: Option<usize>,
warnings: Vec<String>,
},
Value(String),
Unsupported(&'static str),
}Expand description
Why unserialize() failed.
Variants§
Failed
PHP returns false after emitting warnings (the last one is
unserialize(): Error at offset X of Y bytes, except for empty input,
which fails silently). offset is X.
Fields
Value(String)
An invalid option: PHP throws ValueError with this message.
Unsupported(&'static str)
Data PHP reads into something Value cannot hold: objects of other
classes (or __PHP_Incomplete_Class), enums, or a back-reference to
a container still being read (a recursive structure).
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§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 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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