[−][src]Struct talk_loco_commands::BsonResData
Wrapping response status, data
Note: Official server doesn't include response data if operation failed.
Check src/structs/client.rs
Status enum for predefined status ids.
Implementations
impl<D: BsonData> BsonResData<D>
[src]
pub fn new(status: i16, response: Option<D>) -> Self
[src]
pub fn response(self) -> Option<D>
[src]
pub fn as_ref(&self) -> Option<&D>
[src]
pub fn as_mut(&mut self) -> Option<&mut D>
[src]
Trait Implementations
impl<D: Clone> Clone for BsonResData<D>
[src]
pub fn clone(&self) -> BsonResData<D>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<D: BsonData> CommandData for BsonResData<D>
[src]
pub fn method(&self) -> &'static str
[src]
pub fn encode(&self) -> Result<Vec<u8>, Error>
[src]
pub fn decode(data: &Vec<u8>) -> Result<Self, Error>
[src]
impl<D: Debug> Debug for BsonResData<D>
[src]
impl<'de, D> Deserialize<'de> for BsonResData<D> where
D: Deserialize<'de>,
[src]
D: Deserialize<'de>,
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<D> Serialize for BsonResData<D> where
D: Serialize,
[src]
D: Serialize,
Auto Trait Implementations
impl<D> RefUnwindSafe for BsonResData<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for BsonResData<D> where
D: Send,
D: Send,
impl<D> Sync for BsonResData<D> where
D: Sync,
D: Sync,
impl<D> Unpin for BsonResData<D> where
D: Unpin,
D: Unpin,
impl<D> UnwindSafe for BsonResData<D> where
D: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,