Struct Image

Source
pub struct Image(pub OciDir);

Tuple Fields§

§0: OciDir

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 put_blob<C: Compression + Any>( &self, buf: &[u8], image_manifest: &mut ImageManifest, media_type: impl PuzzleFSMediaType, ) -> Result<(Descriptor, [u8; 32], bool), WireFormatError>

Source

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

Source

pub fn get_pfs_rootfs_verity( &self, tag: &str, ) -> Result<[u8; 32], WireFormatError>

Source

pub fn get_pfs_rootfs( &self, tag: &str, verity: Option<&[u8]>, ) -> Result<File, WireFormatError>

Source

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

Source

pub fn open_rootfs_blob( &self, tag: &str, verity: Option<&[u8]>, ) -> Result<RootfsReader, 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<ImageIndex, WireFormatError>

Source

pub fn get_empty_manifest(&self) -> Result<ImageManifest, WireFormatError>

Auto Trait Implementations§

§

impl Freeze for Image

§

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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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.

Source§

impl<T> IntoResult<T> for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.