pub struct MethodResult {
pub code: i8,
pub message: Option<Value>,
}
Expand description
This struct contains the structure for a method return
It consists of a return code and a single message which can be an error, a success or an info message
Is used together with serde
for serialization and deserialization to and from JSON (mainly)
Fields§
§code: i8
The return code of the method 0 = success
0 = error
message: Option<Value>
The message of the method Can be empty if there is nothing to say about the actions that were done
Trait Implementations§
Source§impl Clone for MethodResult
impl Clone for MethodResult
Source§fn clone(&self) -> MethodResult
fn clone(&self) -> MethodResult
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<'de> Deserialize<'de> for MethodResult
impl<'de> Deserialize<'de> for MethodResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MethodResult
impl RefUnwindSafe for MethodResult
impl Send for MethodResult
impl Sync for MethodResult
impl Unpin for MethodResult
impl UnwindSafe for MethodResult
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