pub struct Parameter {
pub name: Option<String>,
pub type_: Option<String>,
pub required: Option<bool>,
}Expand description
One typed, named hole an agent may fill.
Binding semantics follow runtime: the same entry is a SQL bind variable, a
dbt var, or a Python argument depending on it. An agent may supply only
values for declared parameters; it must not author or edit the
computation.
Fields§
§name: Option<String>The parameter name.
type_: Option<String>The parameter’s declared type, e.g. integer, string.
required: Option<bool>Whether a value must be supplied.
Implementations§
Source§impl Parameter
impl Parameter
Sourcepub fn from_value(value: &Value) -> Option<Self>
pub fn from_value(value: &Value) -> Option<Self>
Reads one parameters entry. Returns None when it is not a mapping.
Sourcepub fn list_from_value(value: &Value) -> Vec<Self>
pub fn list_from_value(value: &Value) -> Vec<Self>
Reads the whole parameters list.
Sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
true when the parameter is explicitly marked required.
Trait Implementations§
impl Eq for Parameter
impl StructuralPartialEq for Parameter
Auto Trait Implementations§
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnsafeUnpin for Parameter
impl UnwindSafe for Parameter
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