pub struct CFResponse {
pub status: CFResponseStatus,
pub result: Option<CFResult>,
pub comment: Option<String>,
}
Expand description
Response type used internally which directly represents network responses sent back from the Codeforces API.
Note that using the .get()
function on a type like
CFUserCommand::Info
, will return
a CFResult
(in a result) and not this type. Internally, CFResponse
is used as a wrapper to handle errors and serialization more easily.
Fields§
§status: CFResponseStatus
§result: Option<CFResult>
§comment: Option<String>
Trait Implementations§
Source§impl Clone for CFResponse
impl Clone for CFResponse
Source§fn clone(&self) -> CFResponse
fn clone(&self) -> CFResponse
Returns a duplicate 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 CFResponse
impl Debug for CFResponse
Source§impl<'de> Deserialize<'de> for CFResponse
impl<'de> Deserialize<'de> for CFResponse
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
Source§impl PartialEq for CFResponse
impl PartialEq for CFResponse
Source§impl Serialize for CFResponse
impl Serialize for CFResponse
impl StructuralPartialEq for CFResponse
Auto Trait Implementations§
impl Freeze for CFResponse
impl RefUnwindSafe for CFResponse
impl Send for CFResponse
impl Sync for CFResponse
impl Unpin for CFResponse
impl UnwindSafe for CFResponse
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