pub struct Mount(/* private fields */);Implementations§
Source§impl Mount
impl Mount
pub fn inner(&self) -> MountInner
pub fn blobs(&self) -> BlobsStore
pub fn link(&self) -> Link
Sourcepub async fn save(&self, blobs: &BlobsStore) -> Result<Link, MountError>
pub async fn save(&self, blobs: &BlobsStore) -> Result<Link, MountError>
Save the current mount state to the blobs store
pub async fn init( id: Uuid, name: String, owner: &SecretKey, blobs: &BlobsStore, ) -> Result<Self, MountError>
pub async fn load( link: &Link, secret_key: &SecretKey, blobs: &BlobsStore, ) -> Result<Self, MountError>
pub async fn add<R>( &mut self, path: &Path, data: R, blobs: &BlobsStore, ) -> Result<(), MountError>
pub async fn rm( &mut self, path: &Path, blobs: &BlobsStore, ) -> Result<(), MountError>
pub async fn ls( &self, path: &Path, blobs: &BlobsStore, ) -> Result<BTreeMap<PathBuf, NodeLink>, MountError>
pub async fn ls_deep( &self, path: &Path, blobs: &BlobsStore, ) -> Result<BTreeMap<PathBuf, NodeLink>, MountError>
pub async fn cat( &self, path: &Path, blobs: &BlobsStore, ) -> Result<Vec<u8>, MountError>
Sourcepub async fn get(
&self,
path: &Path,
blobs: &BlobsStore,
) -> Result<NodeLink, MountError>
pub async fn get( &self, path: &Path, blobs: &BlobsStore, ) -> Result<NodeLink, MountError>
Get the NodeLink for a file at a given path
pub async fn _set_node_link_at_path( node: Node, node_link: NodeLink, path: &Path, blobs: &BlobsStore, ) -> Result<(NodeLink, Vec<Hash>), MountError>
pub async fn _put_manifest_in_blobs( bucket_data: &Manifest, blobs: &BlobsStore, ) -> Result<Link, MountError>
pub async fn _put_pins_in_blobs( pins: &Pins, blobs: &BlobsStore, ) -> Result<Link, MountError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mount
impl !RefUnwindSafe for Mount
impl Send for Mount
impl Sync for Mount
impl Unpin for Mount
impl !UnwindSafe for Mount
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