Struct GetLayerParams
pub struct GetLayerParams {
pub diff_id: Option<String>,
pub storage: Option<StorageLocator>,
pub consumer_has_cap_dac_override: bool,
pub layer_index: Option<u64>,
}Expand description
Parameters for the GetLayer method of the org.composefs.Oci interface.
Exactly one of diff_id, storage or layer_index must be set:
- Repo service (
CfsctlService): readsdiff_id, errors ifNone. - Cstor service (
CstorLayerService): readsstorage, errors ifNone. - containers-storage image service (skopeo’s
OpenVarlinkSocket): readslayer_index, errors ifNone.
Both fields are Option for forward-compatibility: new locator kinds can
be added in future without breaking old clients.
Fields§
§diff_id: Option<String>OCI diff-id (sha256:…) identifying the layer in a composefs repo.
storage: Option<StorageLocator>Location of a specific layer inside a containers-storage store.
consumer_has_cap_dac_override: boolWhether the consumer of this layer’s bytes can bypass file DAC
permissions (real root or CAP_DAC_OVERRIDE). When true, the cstor
service may emit FileBackedData chunks even for non-world-readable
files, since the consumer can open them directly. Defaults to false
for backward compatibility.
layer_index: Option<u64>Position of a layer in the image a service serves, from 0 for the
base layer, in the order of the config’s rootfs.diff_ids.
A service bound to one image resolves it with its own record of which layers make up the image, so a layer is found even when its diff ID was never checked, and a config cannot name a layer of an unrelated image. The client still has to verify what it receives against the diff ID it expects.
Trait Implementations§
§impl Clone for GetLayerParams
impl Clone for GetLayerParams
§fn clone(&self) -> GetLayerParams
fn clone(&self) -> GetLayerParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for GetLayerParams
impl Debug for GetLayerParams
§impl Default for GetLayerParams
impl Default for GetLayerParams
§fn default() -> GetLayerParams
fn default() -> GetLayerParams
§impl<'de> Deserialize<'de> for GetLayerParams
impl<'de> Deserialize<'de> for GetLayerParams
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetLayerParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetLayerParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for GetLayerParams
impl Serialize for GetLayerParams
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
§impl Type for GetLayerParams
impl Type for GetLayerParams
Auto Trait Implementations§
impl Freeze for GetLayerParams
impl RefUnwindSafe for GetLayerParams
impl Send for GetLayerParams
impl Sync for GetLayerParams
impl Unpin for GetLayerParams
impl UnsafeUnpin for GetLayerParams
impl UnwindSafe for GetLayerParams
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
§impl<S> CanonJsonSerialize for Swhere
S: Serialize,
impl<S> CanonJsonSerialize for Swhere
S: Serialize,
§fn to_canon_json_writer<W>(&self, writer: W) -> Result<(), Error>where
W: Write,
fn to_canon_json_writer<W>(&self, writer: W) -> Result<(), Error>where
W: Write,
§fn to_canon_json_vec(&self) -> Result<Vec<u8>, Error>
fn to_canon_json_vec(&self) -> Result<Vec<u8>, Error>
§fn to_canon_json_string(&self) -> Result<String, Error>
fn to_canon_json_string(&self) -> Result<String, Error>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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