Struct puzzlefs_lib::oci::Image

source ·
pub struct Image { /* private fields */ }

Implementations§

source§

impl Image

source

pub fn new(oci_dir: &Path) -> Result<Self, WireFormatError>

source

pub fn open(oci_dir: &Path) -> Result<Self, WireFormatError>

source

pub fn blob_path(&self) -> PathBuf

source

pub fn blob_path_relative(&self) -> PathBuf

source

pub fn put_blob<C: for<'a> Compression<'a> + Any, MT: MediaType>( &self, buf: &[u8] ) -> Result<(Descriptor, [u8; 32], bool), WireFormatError>

source

pub fn open_compressed_blob<C: for<'a> Compression<'a>>( &self, digest: &Digest, verity: Option<&[u8]> ) -> Result<Box<dyn Decompressor>>

source

pub fn open_metadata_blob( &self, digest: &Digest, verity: Option<&[u8]> ) -> Result<MetadataBlob, WireFormatError>

source

pub fn get_image_manifest_fd(&self, tag: &str) -> Result<File, WireFormatError>

source

pub fn open_rootfs_blob<C: for<'a> Compression<'a>>( &self, tag: &str, verity: Option<&[u8]> ) -> Result<Rootfs, WireFormatError>

source

pub fn fill_from_chunk( &self, chunk: BlobRef, addl_offset: u64, buf: &mut [u8], verity_data: &Option<BTreeMap<[u8; 32], [u8; 32]>> ) -> Result<usize, WireFormatError>

source

pub fn get_index(&self) -> Result<Index, WireFormatError>

source

pub fn put_index(&self, i: &Index) -> Result<(), WireFormatError>

source

pub fn add_tag( &self, name: &str, desc: Descriptor ) -> Result<(), WireFormatError>

Auto Trait Implementations§

§

impl RefUnwindSafe for Image

§

impl Send for Image

§

impl Sync for Image

§

impl Unpin for Image

§

impl UnwindSafe for Image

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoResult<T> for T

§

type Err = Infallible

§

fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.