pub struct AsyncSessionBuilder<FS: AsyncFilesystem> { /* private fields */ }Expand description
Builder for AsyncSession. This is used to construct an instance of AsyncSession
within an asynchronous context.
Implementations§
Source§impl<FS: AsyncFilesystem> AsyncSessionBuilder<FS>
impl<FS: AsyncFilesystem> AsyncSessionBuilder<FS>
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new builder for AsyncSession.
Sourcepub fn filesystem(self, fs: FS) -> Self
pub fn filesystem(self, fs: FS) -> Self
Set the filesystem implementation for this session. This is required.
Sourcepub fn mountpoint(self, mountpoint: impl AsRef<Path>) -> Self
pub fn mountpoint(self, mountpoint: impl AsRef<Path>) -> Self
Set the mountpoint for this session. This is required.
Sourcepub fn options(self, options: Config) -> Result<Self>
pub fn options(self, options: Config) -> Result<Self>
Set the options for this session. This is required.
Sourcepub async fn build(self) -> Result<AsyncSession<FS>>
pub async fn build(self) -> Result<AsyncSession<FS>>
Build the session. This will mount the filesystem and return an AsyncSession if successful.
Trait Implementations§
Source§impl<FS: Debug + AsyncFilesystem> Debug for AsyncSessionBuilder<FS>
impl<FS: Debug + AsyncFilesystem> Debug for AsyncSessionBuilder<FS>
Source§impl<FS: Default + AsyncFilesystem> Default for AsyncSessionBuilder<FS>
impl<FS: Default + AsyncFilesystem> Default for AsyncSessionBuilder<FS>
Source§fn default() -> AsyncSessionBuilder<FS>
fn default() -> AsyncSessionBuilder<FS>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<FS> Freeze for AsyncSessionBuilder<FS>where
FS: Freeze,
impl<FS> RefUnwindSafe for AsyncSessionBuilder<FS>where
FS: RefUnwindSafe,
impl<FS> Send for AsyncSessionBuilder<FS>
impl<FS> Sync for AsyncSessionBuilder<FS>
impl<FS> Unpin for AsyncSessionBuilder<FS>where
FS: Unpin,
impl<FS> UnsafeUnpin for AsyncSessionBuilder<FS>where
FS: UnsafeUnpin,
impl<FS> UnwindSafe for AsyncSessionBuilder<FS>where
FS: 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