pub struct Path<T, V> { /* private fields */ }Expand description
A path into a document, what its index can be asked, and the type of the value that lives there.
Written by #[derive(Yo)] as a constant per indexed field, so a query names
the field rather than spelling a string the compiler cannot check. A field
marked #[yo(ordered)] gets an Ordered instead, which is the same thing
with ranges on it.
Implementations§
Source§impl<T, V> Path<T, V>
impl<T, V> Path<T, V>
Sourcepub const fn new(path: &'static str, kind: IndexKind) -> Path<T, V>
pub const fn new(path: &'static str, kind: IndexKind) -> Path<T, V>
A path and what its index answers.
The derive calls this. Calling it by hand is allowed and is how a path into a nested object is reached until the derive learns to follow one, but nothing checks that the collection has the index you named until the query runs.
Trait Implementations§
impl<T, V> Copy for Path<T, V>
Auto Trait Implementations§
impl<T, V> Freeze for Path<T, V>
impl<T, V> RefUnwindSafe for Path<T, V>
impl<T, V> Send for Path<T, V>
impl<T, V> Sync for Path<T, V>
impl<T, V> Unpin for Path<T, V>
impl<T, V> UnsafeUnpin for Path<T, V>
impl<T, V> UnwindSafe for Path<T, V>
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