pub struct ContextBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> ContextBuilder<S>
impl<S: State> ContextBuilder<S>
Sourcepub fn build(self) -> Result<Context, ContextError>where
S: IsComplete,
pub fn build(self) -> Result<Context, ContextError>where
S: IsComplete,
Finishes building and performs the requested action.
Sourcepub fn current_working_directory(
self,
value: impl Into<CurrentWorkingDirectory>,
) -> ContextBuilder<SetCurrentWorkingDirectory<S>>where
S::CurrentWorkingDirectory: IsUnset,
pub fn current_working_directory(
self,
value: impl Into<CurrentWorkingDirectory>,
) -> ContextBuilder<SetCurrentWorkingDirectory<S>>where
S::CurrentWorkingDirectory: IsUnset,
Sourcepub fn maybe_current_working_directory(
self,
value: Option<impl Into<CurrentWorkingDirectory>>,
) -> ContextBuilder<SetCurrentWorkingDirectory<S>>where
S::CurrentWorkingDirectory: IsUnset,
pub fn maybe_current_working_directory(
self,
value: Option<impl Into<CurrentWorkingDirectory>>,
) -> ContextBuilder<SetCurrentWorkingDirectory<S>>where
S::CurrentWorkingDirectory: IsUnset,
Sourcepub fn cancellation(
self,
value: Cancellation,
) -> ContextBuilder<SetCancellation<S>>where
S::Cancellation: IsUnset,
pub fn cancellation(
self,
value: Cancellation,
) -> ContextBuilder<SetCancellation<S>>where
S::Cancellation: IsUnset,
Sourcepub fn maybe_cancellation(
self,
value: Option<Cancellation>,
) -> ContextBuilder<SetCancellation<S>>where
S::Cancellation: IsUnset,
pub fn maybe_cancellation(
self,
value: Option<Cancellation>,
) -> ContextBuilder<SetCancellation<S>>where
S::Cancellation: IsUnset,
Sourcepub fn output(self, value: Output) -> ContextBuilder<SetOutput<S>>where
S::Output: IsUnset,
pub fn output(self, value: Output) -> ContextBuilder<SetOutput<S>>where
S::Output: IsUnset,
Required.
Auto Trait Implementations§
impl<S> Freeze for ContextBuilder<S>
impl<S> RefUnwindSafe for ContextBuilder<S>
impl<S> Send for ContextBuilder<S>
impl<S> Sync for ContextBuilder<S>
impl<S> Unpin for ContextBuilder<S>
impl<S> UnsafeUnpin for ContextBuilder<S>
impl<S> UnwindSafe for ContextBuilder<S>
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