pub struct ThrowObject(/* private fields */);
Expand description
Wrapper of Throwable object.
Implementations§
Source§impl ThrowObject
impl ThrowObject
Sourcepub fn new(obj: ZObject) -> Result<Self, NotImplementThrowableError>
pub fn new(obj: ZObject) -> Result<Self, NotImplementThrowableError>
Construct from Throwable object.
Failed if the object is not instance of php Throwable
.
Sourcepub fn from_throwable(t: impl Throwable) -> Self
pub fn from_throwable(t: impl Throwable) -> Self
Construct from Throwable.
Sourcepub fn from_error(e: impl Error + 'static) -> Self
pub fn from_error(e: impl Error + 'static) -> Self
Construct from dynamic Error.
Sourcepub fn into_inner(self) -> ZObject
pub fn into_inner(self) -> ZObject
Consumes the ThrowObject
, returning the wrapped object.
Trait Implementations§
Source§impl Debug for ThrowObject
impl Debug for ThrowObject
Source§impl Display for ThrowObject
impl Display for ThrowObject
Source§impl Error for ThrowObject
impl Error for ThrowObject
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()
Source§impl From<ThrowObject> for Error
impl From<ThrowObject> for Error
Source§fn from(source: ThrowObject) -> Self
fn from(source: ThrowObject) -> Self
Converts to this type from the input type.
Source§impl Throwable for ThrowObject
impl Throwable for ThrowObject
Source§fn get_class(&self) -> &ClassEntry
fn get_class(&self) -> &ClassEntry
Gets the class reference, implemented PHP
Throwable
.Source§fn get_message(&self) -> Option<String>
fn get_message(&self) -> Option<String>
Gets the message.
Auto Trait Implementations§
impl Freeze for ThrowObject
impl RefUnwindSafe for ThrowObject
impl !Send for ThrowObject
impl !Sync for ThrowObject
impl Unpin for ThrowObject
impl UnwindSafe for ThrowObject
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