pub struct SelectExpr {
pub operand: Expr,
pub field: String,
pub test_only: bool,
}Expand description
A field selection expression.
Select expressions access fields on objects or maps. They can represent either:
- Field access:
obj.field(whentest_onlyisfalse) - Presence test:
has(obj.field)(whentest_onlyistrue)
Fields§
§operand: ExprThe expression being selected from (the object).
field: StringThe name of the field being selected.
test_only: boolIf true, this is a presence test rather than field access.
Trait Implementations§
Source§impl Debug for SelectExpr
impl Debug for SelectExpr
Source§impl From<&SelectExpr> for SelectExpr
impl From<&SelectExpr> for SelectExpr
Source§fn from(value: &SelectExpr) -> Self
fn from(value: &SelectExpr) -> Self
Converts to this type from the input type.
Source§impl From<UniquePtr<SelectExpr>> for SelectExpr
impl From<UniquePtr<SelectExpr>> for SelectExpr
Source§fn from(value: UniquePtr<SelectExpr>) -> Self
fn from(value: UniquePtr<SelectExpr>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SelectExpr
impl RefUnwindSafe for SelectExpr
impl Send for SelectExpr
impl Sync for SelectExpr
impl Unpin for SelectExpr
impl UnwindSafe for SelectExpr
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> 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 more