pub struct Context { /* private fields */ }Expand description
A context.
Implementations§
Source§impl Context
impl Context
Sourcepub fn new(
command_runner: impl CommandRunner + Send + Sync + 'static,
console: Arc<Mutex<impl Console + Send + Sync + 'static>>,
database: impl Database + Send + Sync + 'static,
file_system: impl FileSystem + Send + Sync + 'static,
) -> Self
pub fn new( command_runner: impl CommandRunner + Send + Sync + 'static, console: Arc<Mutex<impl Console + Send + Sync + 'static>>, database: impl Database + Send + Sync + 'static, file_system: impl FileSystem + Send + Sync + 'static, ) -> Self
Creates a context.
Sourcepub fn command_runner(&self) -> &(dyn CommandRunner + Send + Sync)
pub fn command_runner(&self) -> &(dyn CommandRunner + Send + Sync)
Returns a command runner.
Sourcepub fn file_system(&self) -> &Arc<dyn FileSystem + Send + Sync> ⓘ
pub fn file_system(&self) -> &Arc<dyn FileSystem + Send + Sync> ⓘ
Returns a file system.
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
impl Freeze for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
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