Trait oci_spec::image::ToDockerV2S2
source · pub trait ToDockerV2S2 {
// Required method
fn to_docker_v2s2(&self) -> Result<&str, Error>;
}
Expand description
Trait to get the Docker Image Manifest V2 Schema 2 media type for an OCI media type
This may be necessary for compatibility with tools that do not recognize the OCI media types.
Where a MediaType
is expected you can use MediaType::ImageManifest.to_docker_v2s2()?
instead and
impl From<&str> for MediaType
will create a MediaType::Other
for it.
Not all OCI Media Types have an equivalent Docker V2S2 Media Type. In those cases, to_docker_v2s2
will error.
Required Methods§
sourcefn to_docker_v2s2(&self) -> Result<&str, Error>
fn to_docker_v2s2(&self) -> Result<&str, Error>
Get the Docker Image Manifest V2 Schema 2 media type equivalent for an OCI media type