Struct btlib::BlockOpenOptions
source · pub struct BlockOpenOptions<T, C> { /* private fields */ }
Expand description
Describes how to open a block, including the inner stream from which the block can be read and the credentials to use to open it.
Implementations§
source§impl BlockOpenOptions<(), ()>
impl BlockOpenOptions<(), ()>
sourcepub fn new() -> BlockOpenOptions<(), ()>
pub fn new() -> BlockOpenOptions<(), ()>
Creates a new empty BlockOpenOptions.
source§impl<T, C> BlockOpenOptions<T, C>
impl<T, C> BlockOpenOptions<T, C>
sourcepub fn with_inner<U>(self, inner: U) -> BlockOpenOptions<U, C>
pub fn with_inner<U>(self, inner: U) -> BlockOpenOptions<U, C>
Configures the given stream to be used for reading and writing the block.
sourcepub fn with_creds<D>(self, creds: D) -> BlockOpenOptions<T, D>
pub fn with_creds<D>(self, creds: D) -> BlockOpenOptions<T, D>
Configures the given Creds to be used to open the block.
sourcepub fn with_encrypt(self, encrypt: bool) -> Self
pub fn with_encrypt(self, encrypt: bool) -> Self
Specifies whether or not the block contents will be encrypted.
sourcepub fn with_block_path(self, block_path: BlockPath) -> Self
pub fn with_block_path(self, block_path: BlockPath) -> Self
Specifies the path of the block. If the block is new, this will be the path it’s created at. If an existing block is being opened, then this is used for validating the block.
sourcepub fn with_parent_key(self, parent_key: Option<SymKey>) -> Self
pub fn with_parent_key(self, parent_key: Option<SymKey>) -> Self
Configures the given parent key to be used for unlocking the block key.
Trait Implementations§
Auto Trait Implementations§
impl<T, C> RefUnwindSafe for BlockOpenOptions<T, C>where C: RefUnwindSafe, T: RefUnwindSafe,
impl<T, C> Send for BlockOpenOptions<T, C>where C: Send, T: Send,
impl<T, C> Sync for BlockOpenOptions<T, C>where C: Sync, T: Sync,
impl<T, C> Unpin for BlockOpenOptions<T, C>where C: Unpin, T: Unpin,
impl<T, C> UnwindSafe for BlockOpenOptions<T, C>where C: UnwindSafe, T: 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