pub struct Argument {
pub id: Option<Identifier>,
pub expression: Expression,
pub src_ref: SrcRef,
}Expand description
Argument in a Call.
Fields§
§id: Option<Identifier>Name of the argument
expression: ExpressionValue of the argument
src_ref: SrcRefSource code reference
Implementations§
Source§impl Argument
impl Argument
Sourcepub fn derived_name(&self) -> Option<Identifier>
pub fn derived_name(&self) -> Option<Identifier>
Returns the name, if self.name is some. If self.name is None, try to extract the name from the expression
Trait Implementations§
Source§impl Eval<ArgumentValue> for Argument
impl Eval<ArgumentValue> for Argument
Source§fn eval(&self, context: &mut EvalContext) -> EvalResult<ArgumentValue>
fn eval(&self, context: &mut EvalContext) -> EvalResult<ArgumentValue>
Evaluate Argument and return ArgumentValue
Source§impl OrdMapValue<Identifier> for Argument
impl OrdMapValue<Identifier> for Argument
Source§fn key(&self) -> Option<Identifier>
fn key(&self) -> Option<Identifier>
return some unique key of this value or
NoneSource§impl SrcReferrer for Argument
impl SrcReferrer for Argument
Source§impl TreeDisplay for Argument
impl TreeDisplay for Argument
Source§fn tree_print(&self, f: &mut Formatter<'_>, depth: TreeState) -> Result
fn tree_print(&self, f: &mut Formatter<'_>, depth: TreeState) -> Result
Write item into
f and use {:depth$} syntax in front of your single line
output to get proper indention.Source§fn display_tree(&self, f: &mut Formatter<'_>) -> Result
fn display_tree(&self, f: &mut Formatter<'_>) -> Result
Display as tree starting at depth
0.Source§fn debug_tree(&self, f: &mut Formatter<'_>) -> Result
fn debug_tree(&self, f: &mut Formatter<'_>) -> Result
Display as tree starting at given depth in debug mode
impl StructuralPartialEq for Argument
Auto Trait Implementations§
impl Freeze for Argument
impl RefUnwindSafe for Argument
impl !Send for Argument
impl !Sync for Argument
impl Unpin for Argument
impl UnwindSafe for Argument
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more