pub struct ContainersStorageRef<'a> { /* private fields */ }Expand description
A parsed containers-storage reference.
The containers-storage transport has a complex format:
containers-storage:[store-spec]image-ref
Where:
store-specis optional:[driver@graphroot+runroot:options]image-refcan be:@image-id,docker-ref, ordocker-ref@image-id
This struct provides access to the parsed components.
Implementations§
Source§impl<'a> ContainersStorageRef<'a>
impl<'a> ContainersStorageRef<'a>
Sourcepub fn store_spec(&self) -> Option<&'a str>
pub fn store_spec(&self) -> Option<&'a str>
The store specifier content (without brackets), if present.
Format: driver@graphroot+runroot:options (all parts optional except graphroot)
Sourcepub fn image_for_skopeo(&self) -> &'a str
pub fn image_for_skopeo(&self) -> &'a str
Returns the image reference normalized for skopeo.
This strips the sha256: prefix if present, working around
skopeo#2750 where
skopeo expects bare image IDs without the algorithm prefix.
Sourcepub fn to_image_reference(&self, normalize: bool) -> ImageReference
pub fn to_image_reference(&self, normalize: bool) -> ImageReference
Convert back to an ImageReference, optionally applying skopeo normalization.
If normalize is true, applies the sha256: stripping workaround.
Trait Implementations§
Source§impl<'a> Clone for ContainersStorageRef<'a>
impl<'a> Clone for ContainersStorageRef<'a>
Source§fn clone(&self) -> ContainersStorageRef<'a>
fn clone(&self) -> ContainersStorageRef<'a>
Returns a duplicate 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<'a> Debug for ContainersStorageRef<'a>
impl<'a> Debug for ContainersStorageRef<'a>
Source§impl<'a> PartialEq for ContainersStorageRef<'a>
impl<'a> PartialEq for ContainersStorageRef<'a>
impl<'a> Eq for ContainersStorageRef<'a>
impl<'a> StructuralPartialEq for ContainersStorageRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for ContainersStorageRef<'a>
impl<'a> RefUnwindSafe for ContainersStorageRef<'a>
impl<'a> Send for ContainersStorageRef<'a>
impl<'a> Sync for ContainersStorageRef<'a>
impl<'a> Unpin for ContainersStorageRef<'a>
impl<'a> UnwindSafe for ContainersStorageRef<'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