pub struct ContextBuilder<___State = __ContextBuilderInitialState> { /* private fields */ }Expand description
Use builder syntax to set the required parameters and finish by calling the method Self::build().
Implementations§
Source§impl<__ModuleLoader, __Cwd> ContextBuilder<(__ModuleLoader, __Cwd)>
impl<__ModuleLoader, __Cwd> ContextBuilder<(__ModuleLoader, __Cwd)>
Sourcepub fn build(self) -> Contextwhere
__ModuleLoader: IntoSet<Rc<RefCell<dyn ModuleLoader>>, ContextBuilder__module_loader>,
__Cwd: IntoSet<Option<PathBuf>, ContextBuilder__cwd>,
pub fn build(self) -> Contextwhere
__ModuleLoader: IntoSet<Rc<RefCell<dyn ModuleLoader>>, ContextBuilder__module_loader>,
__Cwd: IntoSet<Option<PathBuf>, ContextBuilder__cwd>,
Finishes building and performs the requested action.
Sourcepub fn module_loader(
self,
value: Rc<RefCell<dyn ModuleLoader>>,
) -> <Self as __ContextBuilderSetMember>::ModuleLoaderwhere
__ModuleLoader: IsUnset,
pub fn module_loader(
self,
value: Rc<RefCell<dyn ModuleLoader>>,
) -> <Self as __ContextBuilderSetMember>::ModuleLoaderwhere
__ModuleLoader: IsUnset,
Sets the value of module_loader. See Context::builder() for more info.
Sourcepub fn maybe_cwd(
self,
value: Option<PathBuf>,
) -> <Self as __ContextBuilderSetMember>::Cwdwhere
__Cwd: IsUnset,
pub fn maybe_cwd(
self,
value: Option<PathBuf>,
) -> <Self as __ContextBuilderSetMember>::Cwdwhere
__Cwd: IsUnset,
Same as Self::cwd, but accepts an Option as input. See that method’s documentation for more details.
Sourcepub fn cwd(self, value: PathBuf) -> <Self as __ContextBuilderSetMember>::Cwdwhere
__Cwd: IsUnset,
pub fn cwd(self, value: PathBuf) -> <Self as __ContextBuilderSetMember>::Cwdwhere
__Cwd: IsUnset,
Sets the value of cwd. See Context::builder() for more info.
Auto Trait Implementations§
impl<___State> Freeze for ContextBuilder<___State>where
___State: Freeze,
impl<___State = (Unset<Required>, Unset<Optional>)> !RefUnwindSafe for ContextBuilder<___State>
impl<___State = (Unset<Required>, Unset<Optional>)> !Send for ContextBuilder<___State>
impl<___State = (Unset<Required>, Unset<Optional>)> !Sync for ContextBuilder<___State>
impl<___State> Unpin for ContextBuilder<___State>where
___State: Unpin,
impl<___State = (Unset<Required>, Unset<Optional>)> !UnwindSafe for ContextBuilder<___State>
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