pub struct FileSystem;
Implementations§
Source§impl FileSystem
$HOME/hpmq
├──imagedb
│ ├──images.json
│ ├──sha256
│ │ ├──image的manifest文件;文件名为文件的sha256摘要
├──configdb
│ ├──sha256
│ │ ├──image的config文件;文件名为文件的sha256摘要
├──layerdb
│ ├──contents?(待实现)
│ │ │ layer的描述文件(Descriptor);文件名为文件的sha256摘要
│ ├──blobs
│ │ ├──sha256
│ │ │ ├──image的layer文件
├──containerdb
│ ├──image的manifest文件的sha256
│ │ ├──image展开后的文件目录
impl FileSystem
$HOME/hpmq ├──imagedb │ ├──images.json │ ├──sha256 │ │ ├──image的manifest文件;文件名为文件的sha256摘要 ├──configdb │ ├──sha256 │ │ ├──image的config文件;文件名为文件的sha256摘要 ├──layerdb │ ├──contents?(待实现) │ │ │ layer的描述文件(Descriptor);文件名为文件的sha256摘要 │ ├──blobs │ │ ├──sha256 │ │ │ ├──image的layer文件 ├──containerdb │ ├──image的manifest文件的sha256 │ │ ├──image展开后的文件目录
Sourcepub fn home(&self) -> Result<PathBuf>
pub fn home(&self) -> Result<PathBuf>
Platform | Value | Example |
---|---|---|
Linux | $HOME | /home/alice |
macOS | $HOME | /Users/Alice |
Windows | {FOLDERID_Profile} | C:\Users\Alice |
pub fn layer(&self) -> Result<PathBuf>
pub fn layer_contents(&self) -> Result<PathBuf>
pub fn layer_blobs(&self) -> Result<PathBuf>
pub fn manifest_sha256(&self) -> Result<PathBuf>
pub fn config_sha256(&self) -> Result<PathBuf>
pub fn images_json(&self) -> Result<PathBuf>
pub fn container(&self) -> Result<PathBuf>
pub fn exist_config(&self, sha256_digest: &String) -> Result<bool>
pub fn exist_layer(&self, sha256_digest: &String) -> Result<bool>
pub fn exist_container(&self, sha256_digest: &String) -> Result<bool>
pub fn save_config(&self, sha256_digest: &String, data: &[u8]) -> Result<()>
pub fn save_manifest(&self, sha256_digest: &String, data: &[u8]) -> Result<()>
pub fn save_layer(&self, sha256_digest: &String, data: &[u8]) -> Result<()>
Auto Trait Implementations§
impl Freeze for FileSystem
impl RefUnwindSafe for FileSystem
impl Send for FileSystem
impl Sync for FileSystem
impl Unpin for FileSystem
impl UnwindSafe for FileSystem
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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