pub enum MethodResponseResult {
Success,
Failed(i32),
}
Available on crate feature
server
only.Expand description
Represent the outcome of a method call success or failed.
Variants§
Implementations§
source§impl MethodResponseResult
impl MethodResponseResult
sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Returns whether the call was successful.
sourcepub fn as_error_code(&self) -> Option<i32>
pub fn as_error_code(&self) -> Option<i32>
Get the error code
Returns Some(error code)
if the call failed.
Trait Implementations§
source§impl Clone for MethodResponseResult
impl Clone for MethodResponseResult
source§fn clone(&self) -> MethodResponseResult
fn clone(&self) -> MethodResponseResult
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 MethodResponseResult
impl Debug for MethodResponseResult
impl Copy for MethodResponseResult
Auto Trait Implementations§
impl RefUnwindSafe for MethodResponseResult
impl Send for MethodResponseResult
impl Sync for MethodResponseResult
impl Unpin for MethodResponseResult
impl UnwindSafe for MethodResponseResult
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