pub enum BatchResponseBody {
Success(BatchSuccessResponseBody),
Error(BatchErrorResponseBody),
}
Variants§
Success(BatchSuccessResponseBody)
Error(BatchErrorResponseBody)
Implementations§
Source§impl BatchResponseBody
impl BatchResponseBody
Sourcepub fn as_success(&self) -> Option<&BatchSuccessResponseBody>
pub fn as_success(&self) -> Option<&BatchSuccessResponseBody>
Returns Some(&BatchSuccessResponseBody)
if the response is a success.
Sourcepub fn as_error(&self) -> Option<&BatchErrorResponseBody>
pub fn as_error(&self) -> Option<&BatchErrorResponseBody>
Returns Some(&BatchErrorResponseBody)
if the response is an error.
Sourcepub fn choices(&self) -> Option<&[BatchChoice]>
pub fn choices(&self) -> Option<&[BatchChoice]>
Retrieves the choices
if the response is successful.
Sourcepub fn usage(&self) -> Option<&BatchUsage>
pub fn usage(&self) -> Option<&BatchUsage>
Retrieves the usage
if the response is successful.
Sourcepub fn system_fingerprint(&self) -> Option<&str>
pub fn system_fingerprint(&self) -> Option<&str>
Retrieves the system_fingerprint
if the response is successful.
Trait Implementations§
Source§impl Debug for BatchResponseBody
impl Debug for BatchResponseBody
Source§impl<'de> Deserialize<'de> for BatchResponseBody
impl<'de> Deserialize<'de> for BatchResponseBody
Source§fn deserialize<D>(deserializer: D) -> Result<BatchResponseBody, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<BatchResponseBody, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BatchResponseBody
impl RefUnwindSafe for BatchResponseBody
impl Send for BatchResponseBody
impl !Sync for BatchResponseBody
impl Unpin for BatchResponseBody
impl UnwindSafe for BatchResponseBody
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