pub trait WithInputs: Sized {
// Required method
fn inputs_mut(&mut self) -> &mut Option<Dict>;
// Provided methods
fn with_inputs<I, K, V>(self, inputs: I) -> Self
where I: IntoIterator<Item = (K, V)>,
K: Into<Str>,
V: IntoValue { ... }
fn with_inputs_dict(self, inputs: Dict) -> Self { ... }
fn with_inputs_obj(self, inputs: Inputs) -> Self { ... }
}Expand description
Trait for types that accept sys.inputs configuration.
Provides with_inputs, with_inputs_dict, and with_inputs_obj methods.
Required Methods§
Sourcefn inputs_mut(&mut self) -> &mut Option<Dict>
fn inputs_mut(&mut self) -> &mut Option<Dict>
Get mutable reference to the inputs field.
Provided Methods§
Sourcefn with_inputs<I, K, V>(self, inputs: I) -> Self
fn with_inputs<I, K, V>(self, inputs: I) -> Self
Sourcefn with_inputs_dict(self, inputs: Dict) -> Self
fn with_inputs_dict(self, inputs: Dict) -> Self
Set sys.inputs from a pre-built Dict.
Sourcefn with_inputs_obj(self, inputs: Inputs) -> Self
fn with_inputs_obj(self, inputs: Inputs) -> Self
Set sys.inputs from an Inputs object.
Use Inputs::from_json() or Inputs::from_json_with_content()
to create the inputs.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.