Enum cargo_credential::CacheControl
source · #[non_exhaustive]pub enum CacheControl {
Never,
Expires {
expiration: OffsetDateTime,
},
Session,
Unknown,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Never
Do not cache this result.
Expires
Fields
§
expiration: OffsetDateTime
Cache this result and use it for subsequent requests in the current Cargo invocation until the specified time.
Session
Cache this result and use it for all subsequent requests in the current Cargo invocation.
Unknown
Trait Implementations§
source§impl Clone for CacheControl
impl Clone for CacheControl
source§fn clone(&self) -> CacheControl
fn clone(&self) -> CacheControl
Returns a copy 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 CacheControl
impl Debug for CacheControl
source§impl<'de> Deserialize<'de> for CacheControl
impl<'de> Deserialize<'de> for CacheControl
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<CacheControl> for CacheControl
impl PartialEq<CacheControl> for CacheControl
source§fn eq(&self, other: &CacheControl) -> bool
fn eq(&self, other: &CacheControl) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for CacheControl
impl Serialize for CacheControl
impl Eq for CacheControl
impl StructuralEq for CacheControl
impl StructuralPartialEq for CacheControl
Auto Trait Implementations§
impl RefUnwindSafe for CacheControl
impl Send for CacheControl
impl Sync for CacheControl
impl Unpin for CacheControl
impl UnwindSafe for CacheControl
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
impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Size for each variant:
Never
: 0 bytesExpires
: 16 bytesSession
: 0 bytesUnknown
: 0 bytes