#[non_exhaustive]pub struct IifNode {
pub test_expression: Box<Expression>,
pub true_expression: Box<Expression>,
pub false_expression: Box<Expression>,
/* private fields */
}Expand description
A node representing the special IIF conditional syntax
E.g. IIF(A, B, C)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.test_expression: Box<Expression>The expression that represents the test or the conditional
true_expression: Box<Expression>The expression to execute if the test returns true
false_expression: Box<Expression>The expression to execute if the test returns false
Implementations§
Source§impl IifNode
impl IifNode
Sourcepub fn new(
test: impl Into<Box<Expression>>,
t: impl Into<Box<Expression>>,
f: impl Into<Box<Expression>>,
) -> Self
pub fn new( test: impl Into<Box<Expression>>, t: impl Into<Box<Expression>>, f: impl Into<Box<Expression>>, ) -> Self
Create a new node
Sourcepub fn test(&self) -> &Expression
pub fn test(&self) -> &Expression
The expression that represents the test or the conditional
Sourcepub fn t(&self) -> &Expression
pub fn t(&self) -> &Expression
The expression to execute if the test returns true
Sourcepub fn f(&self) -> &Expression
pub fn f(&self) -> &Expression
The expression to execute if the test returns false
Trait Implementations§
Source§impl From<IifNode> for Expression
impl From<IifNode> for Expression
Source§fn from(node: IifNode) -> Expression
fn from(node: IifNode) -> Expression
Converts to this type from the input type.
impl Eq for IifNode
impl StructuralPartialEq for IifNode
Auto Trait Implementations§
impl Freeze for IifNode
impl RefUnwindSafe for IifNode
impl Send for IifNode
impl Sync for IifNode
impl Unpin for IifNode
impl UnwindSafe for IifNode
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)