pub struct CargoContainer { /* private fields */ }

Implementations§

source§

impl CargoContainer

source

pub fn new( container_manager: ContainerManager, corex_container: Container, encrypted: bool, multi_device_state: UserMultideviceState, dfs_api: DfsApi ) -> Self

source

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.
source

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.
source

pub fn is_mounted(&self) -> bool

source

pub fn is_automounted(&self) -> Result<bool, MultideviceStateError>

Checks if the container is set as persistently mounted in one of contexts (global or local)

source

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.

source

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.

source

pub fn get_storages(&self) -> Result<Vec<ContainerStorage>, CoreXError>

source

pub fn add_storage( &mut self, storage_template: &StorageTemplate ) -> Result<ContainerStorage, AddStorageError>

source

pub fn remove_storage(&mut self, uuid: &Uuid) -> Result<(), CoreXError>

source

pub fn change_path(&self, path: String) -> Result<(), CatlibError>

source

pub fn get_path(&self) -> Result<String, CatlibError>

source

pub fn set_name(&self, new_name: String) -> Result<(), CatlibError>

source

pub fn remove(&self) -> Result<(), CatlibError>

source

pub fn name(&self) -> Result<String, CatlibError>

source

pub fn uuid(&self) -> Uuid

Trait Implementations§

source§

impl Clone for CargoContainer

source§

fn clone(&self) -> CargoContainer

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CargoContainer

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Any for Twhere T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for Twhere T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more