pub struct ResourceResponse<'a> {
pub status: ResourceResponseStatus,
pub error_reason: ResourceErrorReason,
pub bytes: &'a [u8],
pub error_message: &'a str,
pub must_revalidate: bool,
pub modified_unix_ms: Option<i64>,
pub expires_unix_ms: Option<i64>,
pub etag: &'a str,
pub retry_after_unix_ms: Option<i64>,
}Expand description
The answer to a resource request.
See mln_resource_response in the
C API reference.
Fields§
§status: ResourceResponseStatus§error_reason: ResourceErrorReasonWhy the request failed, for ResourceResponseStatus::Error.
bytes: &'a [u8]The resource, for ResourceResponseStatus::Ok.
error_message: &'a strA description of the error, for ResourceResponseStatus::Error.
must_revalidate: boolWhether the library must request the resource again before it reuses this copy.
modified_unix_ms: Option<i64>§expires_unix_ms: Option<i64>§etag: &'a strEmpty when the resource has no ETag.
retry_after_unix_ms: Option<i64>When to retry, for ResourceResponseStatus::Error.
Trait Implementations§
Source§impl<'a> Clone for ResourceResponse<'a>
impl<'a> Clone for ResourceResponse<'a>
Source§fn clone(&self) -> ResourceResponse<'a>
fn clone(&self) -> ResourceResponse<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ResourceResponse<'a>
impl<'a> Debug for ResourceResponse<'a>
Source§impl<'a> Default for ResourceResponse<'a>
impl<'a> Default for ResourceResponse<'a>
Source§fn default() -> ResourceResponse<'a>
fn default() -> ResourceResponse<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> PartialEq for ResourceResponse<'a>
impl<'a> PartialEq for ResourceResponse<'a>
impl<'a> StructuralPartialEq for ResourceResponse<'a>
Auto Trait Implementations§
impl<'a> Freeze for ResourceResponse<'a>
impl<'a> RefUnwindSafe for ResourceResponse<'a>
impl<'a> Send for ResourceResponse<'a>
impl<'a> Sync for ResourceResponse<'a>
impl<'a> Unpin for ResourceResponse<'a>
impl<'a> UnsafeUnpin for ResourceResponse<'a>
impl<'a> UnwindSafe for ResourceResponse<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more