Struct wildland_cargo_lib::api::container::CargoContainer
source · pub struct CargoContainer { /* private fields */ }
Implementations§
source§impl CargoContainer
impl CargoContainer
pub fn new( container_manager: ContainerManager, corex_container: Container, encrypted: bool, multi_device_state: UserMultideviceState, dfs_api: DfsApi ) -> Self
sourcepub fn mount(
&self,
persistent_mount: Option<Persistency>
) -> Result<(), ContainerManagerError>
pub fn mount( &self, persistent_mount: Option<Persistency> ) -> Result<(), ContainerManagerError>
Tries to mount the container.
Args:
- persistent_mount - optional argument which can mark a containers as being automatically mounted.
Containers can be marked as persistent in either global (user’s) or local (device’s) context.
Passing
None
value indicates that a container is being mounted temporarily.
sourcepub fn unmount(
&self,
persistent_unmount: Option<Persistency>
) -> Result<(), ContainerManagerError>
pub fn unmount( &self, persistent_unmount: Option<Persistency> ) -> Result<(), ContainerManagerError>
Tries to unmount the container.
Args:
- persistent_unmount - optional argument which can unset persistency setting, either in global (user’s) or local (device’s) context.
Passing
None
value indicates that persistency will not be changed.
pub fn is_mounted(&self) -> bool
sourcepub fn is_automounted(&self) -> Result<bool, MultideviceStateError>
pub fn is_automounted(&self) -> Result<bool, MultideviceStateError>
Checks if the container is set as persistently mounted in one of contexts (global or local)
sourcepub fn set_persistency(
&self,
persistency: Persistency
) -> Result<(), MultideviceStateError>
pub fn set_persistency( &self, persistency: Persistency ) -> Result<(), MultideviceStateError>
Sets a container as persistently mounted in one of contexts (global or local) specified by the argument.
sourcepub fn unset_persistency(
&self,
persistency: Persistency
) -> Result<(), MultideviceStateError>
pub fn unset_persistency( &self, persistency: Persistency ) -> Result<(), MultideviceStateError>
Unsets a container as persistently mounted in one of contexts (global or local) specified by the argument.
pub fn get_storages(&self) -> Result<Vec<ContainerStorage>, CoreXError>
pub fn add_storage( &mut self, storage_template: &StorageTemplate ) -> Result<ContainerStorage, AddStorageError>
pub fn remove_storage(&mut self, uuid: &Uuid) -> Result<(), CoreXError>
pub fn change_path(&self, path: String) -> Result<(), CatlibError>
pub fn get_path(&self) -> Result<String, CatlibError>
pub fn set_name(&self, new_name: String) -> Result<(), CatlibError>
pub fn remove(&self) -> Result<(), CatlibError>
pub fn name(&self) -> Result<String, CatlibError>
pub fn uuid(&self) -> Uuid
Trait Implementations§
source§impl Clone for CargoContainer
impl Clone for CargoContainer
source§fn clone(&self) -> CargoContainer
fn clone(&self) -> CargoContainer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CargoContainer
impl Send for CargoContainer
impl Sync for CargoContainer
impl Unpin for CargoContainer
impl !UnwindSafe for CargoContainer
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