pub struct FormatDriverBuilderBase<S: Storage> { /* private fields */ }Expand description
Image open builder with the most basic options.
Implementations§
Source§impl<S: Storage + 'static> FormatDriverBuilderBase<S>
impl<S: Storage + 'static> FormatDriverBuilderBase<S>
Sourcepub fn new(image: S) -> Self
pub fn new(image: S) -> Self
Helper for FormatDriverBuilder::new().
Sourcepub fn new_path<P: AsRef<Path>>(path: P) -> Self
pub fn new_path<P: AsRef<Path>>(path: P) -> Self
Helper for FormatDriverBuilder::new_path().
Sourcepub fn set_write(&mut self, writable: bool)
pub fn set_write(&mut self, writable: bool)
Helper for FormatDriverBuilder::write().
Sourcepub fn set_storage_open_options(&mut self, options: StorageOpenOptions)
pub fn set_storage_open_options(&mut self, options: StorageOpenOptions)
Helper for FormatDriverBuilder::storage_open_options().
Sourcepub fn get_image_path(&self) -> Option<PathBuf>
pub fn get_image_path(&self) -> Option<PathBuf>
If possible, get the image’s path.
Sourcepub fn get_writable(&self) -> bool
pub fn get_writable(&self) -> bool
Return the set writable state.
Sourcepub fn get_storage_opts(&self) -> Option<&StorageOpenOptions>
pub fn get_storage_opts(&self) -> Option<&StorageOpenOptions>
Return the set storage options (if any).
Sourcepub fn make_storage_opts(&self) -> StorageOpenOptions
pub fn make_storage_opts(&self) -> StorageOpenOptions
Create storage options.
If any were set, return those, overriding their writable state based on the set writable
state (FormatDriverBuilderBase::set_write()). Otherwise, create an empty set (again
with the writable state set as appropriate).
Sourcepub async fn open_image<G: ImplicitOpenGate<S>>(self, gate: &mut G) -> Result<S>
pub async fn open_image<G: ImplicitOpenGate<S>>(self, gate: &mut G) -> Result<S>
Open the image’s storage object.
Auto Trait Implementations§
impl<S> Freeze for FormatDriverBuilderBase<S>where
StorageOrPath<S>: Freeze,
impl<S> RefUnwindSafe for FormatDriverBuilderBase<S>where
StorageOrPath<S>: RefUnwindSafe,
impl<S> Send for FormatDriverBuilderBase<S>where
StorageOrPath<S>: Send,
impl<S> Sync for FormatDriverBuilderBase<S>where
StorageOrPath<S>: Sync,
impl<S> Unpin for FormatDriverBuilderBase<S>where
StorageOrPath<S>: Unpin,
impl<S> UnsafeUnpin for FormatDriverBuilderBase<S>where
StorageOrPath<S>: UnsafeUnpin,
impl<S> UnwindSafe for FormatDriverBuilderBase<S>where
StorageOrPath<S>: UnwindSafe,
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