pub struct State<'a, T: Queryable> {
pub data: Data<'a, T>,
pub root: &'a T,
}
Expand description
Represents the state of a query, including the current data and the root object. It is used to track the progress of a query as it traverses through the data structure.
Fields§
§data: Data<'a, T>
§root: &'a T
Implementations§
Source§impl<'a, T: Queryable> State<'a, T>
impl<'a, T: Queryable> State<'a, T>
pub fn bool(b: bool, root: &T) -> State<'_, T>
pub fn i64(i: i64, root: &T) -> State<'_, T>
pub fn str(v: &str, root: &'a T) -> State<'a, T>
pub fn shift_to_root(self) -> State<'a, T>
pub fn root(root: &'a T) -> Self
pub fn nothing(root: &'a T) -> Self
pub fn data(root: &'a T, data: Data<'a, T>) -> Self
pub fn ok_ref(self) -> Option<Vec<Pointer<'a, T>>>
pub fn ok_val(self) -> Option<T>
pub fn is_nothing(&self) -> bool
pub fn reduce(self, other: State<'a, T>) -> State<'a, T>
pub fn flat_map<F>(self, f: F) -> State<'a, T>
Trait Implementations§
impl<'a, T: Queryable> StructuralPartialEq for State<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for State<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for State<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for State<'a, T>
impl<'a, T> Sync for State<'a, T>where
T: Sync,
impl<'a, T> Unpin for State<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for State<'a, T>where
T: UnwindSafe + RefUnwindSafe,
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