pub struct FunctionWithArgOptsBuilder<'a> { /* private fields */ }
Expand description
Builder for FunctionWithArgOpts
.
Implementations§
Source§impl<'a> FunctionWithArgOptsBuilder<'a>
impl<'a> FunctionWithArgOptsBuilder<'a>
Sourcepub fn default_path<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
pub fn default_path<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
Sourcepub fn default_value<VALUE: Into<Json>>(&mut self, value: VALUE) -> &mut Self
pub fn default_value<VALUE: Into<Json>>(&mut self, value: VALUE) -> &mut Self
A default value to use for this argument if not explicitly set by the caller, if any
Sourcepub fn description<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
pub fn description<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
A doc string for the argument, if any
Sourcepub fn ignore<VALUE: Into<Vec<&'a str>>>(&mut self, value: VALUE) -> &mut Self
pub fn ignore<VALUE: Into<Vec<&'a str>>>(&mut self, value: VALUE) -> &mut Self
Patterns to ignore when loading the contextual argument value.
Sourcepub fn source_map<VALUE: Into<SourceMapId>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn source_map<VALUE: Into<SourceMapId>>( &mut self, value: VALUE, ) -> &mut Self
The source map for the argument definition.
Sourcepub fn build(
&self,
) -> Result<FunctionWithArgOpts<'a>, FunctionWithArgOptsBuilderError>
pub fn build( &self, ) -> Result<FunctionWithArgOpts<'a>, FunctionWithArgOptsBuilderError>
Trait Implementations§
Source§impl<'a> Clone for FunctionWithArgOptsBuilder<'a>
impl<'a> Clone for FunctionWithArgOptsBuilder<'a>
Source§fn clone(&self) -> FunctionWithArgOptsBuilder<'a>
fn clone(&self) -> FunctionWithArgOptsBuilder<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for FunctionWithArgOptsBuilder<'a>
impl<'a> RefUnwindSafe for FunctionWithArgOptsBuilder<'a>
impl<'a> Send for FunctionWithArgOptsBuilder<'a>
impl<'a> Sync for FunctionWithArgOptsBuilder<'a>
impl<'a> Unpin for FunctionWithArgOptsBuilder<'a>
impl<'a> UnwindSafe for FunctionWithArgOptsBuilder<'a>
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