pub enum Part {
}Variants§
All
Flatten
Last
First
Field(Strand)
Where(Expr)
Lookup(Box<Lookup>)
Value(Expr)
Start(Expr)
TODO: Remove, start and move it out of part to eliminate invalid state.
Method(Strand, Vec<Expr>)
Destructure(Vec<DestructurePart>)
Optional
Recurse(Recurse, Option<Idiom>, Option<RecurseInstruction>)
Doc
RepeatRecurse
Implementations§
Source§impl Part
impl Part
Sourcepub fn index_int(idx: i64) -> Self
pub fn index_int(idx: i64) -> Self
Returns a part which is equivalent to [1] if called with integer 1.
pub fn is_index(&self) -> bool
Sourcepub fn as_old_index(&self) -> Option<usize>
pub fn as_old_index(&self) -> Option<usize>
Returns the idex if this part would have been Part::Index(x) before
that field was removed.
TODO: Remove this method once we work out the kinks with removing
Part::Index(x) and only having Part::Value(x)
Already marked as deprecated for the full release to remind that this behavior should be fixed.
Sourcepub fn read_only(&self) -> bool
pub fn read_only(&self) -> bool
Whether evaluating this part can be done on a read-only transaction.
Matched exhaustively on purpose: a new variant that carries an expression must be classified here rather than defaulting to read-only, which would let a mutation reach a read-only transaction.
pub fn to_raw_string(&self) -> String
Trait Implementations§
impl Eq for Part
Source§impl PartialOrd for Part
impl PartialOrd for Part
impl StructuralPartialEq for Part
Auto Trait Implementations§
impl !Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnsafeUnpin for Part
impl UnwindSafe for Part
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.