pub struct StorageContext<'a> {
pub settings: &'a Settings,
pub attribution: RequestAttribution<'a>,
}Expand description
Everything a Storage implementation needs to know about the calling
context of a single operation.
Fields§
§settings: &'a Settings§attribution: RequestAttribution<'a>Implementations§
Source§impl<'a> StorageContext<'a>
impl<'a> StorageContext<'a>
pub fn new(settings: &'a Settings, attribution: RequestAttribution<'a>) -> Self
Sourcepub fn without_node(
settings: &'a Settings,
labels: &'a AttributionLabels,
) -> Self
pub fn without_node( settings: &'a Settings, labels: &'a AttributionLabels, ) -> Self
A context for a request that is not about any node.
Sourcepub fn unattributed(settings: &'a Settings) -> Self
pub fn unattributed(settings: &'a Settings) -> Self
A context for code that drives a Storage directly, with no
repository behind it: tests, examples, and tools that list or inspect
a bucket. Requests carry only the icechunk product token.
Anything that goes through a repository has labels and must use the
asset manager’s storage_context or StorageContext::without_node
instead, so that no repository request goes out unattributed.
Trait Implementations§
Source§impl<'a> Clone for StorageContext<'a>
impl<'a> Clone for StorageContext<'a>
impl<'a> Copy for StorageContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for StorageContext<'a>
impl<'a> RefUnwindSafe for StorageContext<'a>
impl<'a> Send for StorageContext<'a>
impl<'a> Sync for StorageContext<'a>
impl<'a> Unpin for StorageContext<'a>
impl<'a> UnsafeUnpin for StorageContext<'a>
impl<'a> UnwindSafe for StorageContext<'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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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