pub struct PandoraResponse<T> {
pub stat: PandoraStatus,
pub result: Option<T>,
pub message: Option<String>,
pub code: Option<u32>,
}
Expand description
A generic type to aid in converting the returned Json document from a Pandora API call into a custom struct T that deserializes the content of the API call result.
Fields§
§stat: PandoraStatus
The reported status of the call
result: Option<T>
The resulting content of the API call
message: Option<String>
A message explaining the returned code
code: Option<u32>
A numeric error code
Trait Implementations§
Source§impl<T: Debug> Debug for PandoraResponse<T>
impl<T: Debug> Debug for PandoraResponse<T>
Source§impl<'de, T> Deserialize<'de> for PandoraResponse<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for PandoraResponse<T>where
T: Deserialize<'de>,
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<T: DeserializeOwned> From<PandoraResponse<T>> for Result<T, JsonError>
impl<T: DeserializeOwned> From<PandoraResponse<T>> for Result<T, JsonError>
Source§fn from(pandora_resp: PandoraResponse<T>) -> Self
fn from(pandora_resp: PandoraResponse<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for PandoraResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for PandoraResponse<T>where
T: RefUnwindSafe,
impl<T> Send for PandoraResponse<T>where
T: Send,
impl<T> Sync for PandoraResponse<T>where
T: Sync,
impl<T> Unpin for PandoraResponse<T>where
T: Unpin,
impl<T> UnwindSafe for PandoraResponse<T>where
T: UnwindSafe,
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