#[non_exhaustive]pub struct ResourceRequest {Show 13 fields
pub url: String,
pub kind: ResourceKind,
pub loading_methods: LoadingMethods,
pub storage_policy: StoragePolicy,
pub priority: Priority,
pub usage: Usage,
pub tile: Option<TileRequest>,
pub data_range: Option<RangeInclusive<u64>>,
pub prior_modified: Option<SystemTime>,
pub prior_expires: Option<SystemTime>,
pub prior_etag: Option<String>,
pub prior_data: Option<Vec<u8>>,
pub minimum_update_interval: Duration,
}Expand description
Resource metadata passed to FileSource implementations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.url: StringResolved resource URL.
kind: ResourceKindResource kind.
loading_methods: LoadingMethodsAllowed loading methods.
storage_policy: StoragePolicyStorage policy requested by MapLibre Native.
priority: PriorityPriority requested by MapLibre Native.
usage: UsageWhether the request is made for online or offline use.
tile: Option<TileRequest>Tile metadata, present for tile requests.
data_range: Option<RangeInclusive<u64>>Requested inclusive byte range, present for partial reads.
prior_modified: Option<SystemTime>Previous Last-Modified value from cache, if known.
prior_expires: Option<SystemTime>Previous Expires value from cache, if known.
prior_etag: Option<String>Previous ETag, if known.
prior_data: Option<Vec<u8>>Previous body bytes from cache, if needed for a 304 response.
minimum_update_interval: DurationMinimum interval before refreshing this resource.
Trait Implementations§
Source§impl Clone for ResourceRequest
impl Clone for ResourceRequest
Source§fn clone(&self) -> ResourceRequest
fn clone(&self) -> ResourceRequest
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 Debug for ResourceRequest
impl Debug for ResourceRequest
impl Eq for ResourceRequest
Source§impl PartialEq for ResourceRequest
impl PartialEq for ResourceRequest
impl StructuralPartialEq for ResourceRequest
Auto Trait Implementations§
impl Freeze for ResourceRequest
impl RefUnwindSafe for ResourceRequest
impl Send for ResourceRequest
impl Sync for ResourceRequest
impl Unpin for ResourceRequest
impl UnsafeUnpin for ResourceRequest
impl UnwindSafe for ResourceRequest
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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