pub struct RootVolume { /* private fields */ }
Expand description
RootVolume is the top-level volume which stores references to all of the other Volumes.
Implementations§
Source§impl RootVolume
impl RootVolume
pub fn volume_directory(&self) -> &Directory<ObjectStore>
Sourcepub async fn new_volume(
&self,
volume_name: &str,
owner: Weak<dyn StoreOwner>,
crypt: Option<Arc<dyn Crypt>>,
) -> Result<Arc<ObjectStore>, Error>
pub async fn new_volume( &self, volume_name: &str, owner: Weak<dyn StoreOwner>, crypt: Option<Arc<dyn Crypt>>, ) -> Result<Arc<ObjectStore>, Error>
Creates a new volume under a transaction lock.
Sourcepub async fn volume(
&self,
volume_name: &str,
owner: Weak<dyn StoreOwner>,
crypt: Option<Arc<dyn Crypt>>,
) -> Result<Arc<ObjectStore>, Error>
pub async fn volume( &self, volume_name: &str, owner: Weak<dyn StoreOwner>, crypt: Option<Arc<dyn Crypt>>, ) -> Result<Arc<ObjectStore>, Error>
Returns the volume with the given name. This is not thread-safe.
Sourcepub async fn volume_from_id(
&self,
store_object_id: u64,
owner: Weak<dyn StoreOwner>,
crypt: Option<Arc<dyn Crypt>>,
) -> Result<Arc<ObjectStore>, Error>
pub async fn volume_from_id( &self, store_object_id: u64, owner: Weak<dyn StoreOwner>, crypt: Option<Arc<dyn Crypt>>, ) -> Result<Arc<ObjectStore>, Error>
Returns the volume with the given id. This is not thread-safe.
Sourcepub async fn delete_volume(
&self,
volume_name: &str,
transaction: Transaction<'_>,
callback: impl FnOnce() + Send,
) -> Result<(), Error>
pub async fn delete_volume( &self, volume_name: &str, transaction: Transaction<'_>, callback: impl FnOnce() + Send, ) -> Result<(), Error>
Deletes the given volume. Consumes |transaction| and runs |callback| during commit.
Auto Trait Implementations§
impl !Freeze for RootVolume
impl !RefUnwindSafe for RootVolume
impl Send for RootVolume
impl Sync for RootVolume
impl Unpin for RootVolume
impl !UnwindSafe for RootVolume
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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