Struct oci_client::client::Config
source · pub struct Config {
pub data: Vec<u8>,
pub media_type: String,
pub annotations: Option<BTreeMap<String, String>>,
}
Expand description
The data and media type for a configuration object
Fields§
§data: Vec<u8>
The data of this config object
media_type: String
The media type of this object
annotations: Option<BTreeMap<String, String>>
This OPTIONAL property contains arbitrary metadata for this descriptor. This OPTIONAL property MUST use the annotation rules
Implementations§
source§impl Config
impl Config
sourcepub fn new(
data: Vec<u8>,
media_type: String,
annotations: Option<BTreeMap<String, String>>,
) -> Self
pub fn new( data: Vec<u8>, media_type: String, annotations: Option<BTreeMap<String, String>>, ) -> Self
Constructs a new Config struct with provided data and media type
sourcepub fn oci_v1(
data: Vec<u8>,
annotations: Option<BTreeMap<String, String>>,
) -> Self
pub fn oci_v1( data: Vec<u8>, annotations: Option<BTreeMap<String, String>>, ) -> Self
Constructs a new Config struct with provided data and media type application/vnd.oci.image.config.v1+json
sourcepub fn oci_v1_from_config_file(
config_file: ConfigFile,
annotations: Option<BTreeMap<String, String>>,
) -> Result<Self>
pub fn oci_v1_from_config_file( config_file: ConfigFile, annotations: Option<BTreeMap<String, String>>, ) -> Result<Self>
Construct a new Config struct with provided ConfigFile
and
media type application/vnd.oci.image.config.v1+json
sourcepub fn sha256_digest(&self) -> String
pub fn sha256_digest(&self) -> String
Helper function to compute the sha256 digest of this config object
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)