pub struct MaterializedPath(/* private fields */);Expand description
Helper for building, parsing, and querying materialized paths.
A path is a sequence of hex id segments joined by / with a trailing
/. Example for ids 1, 3, 8: "0001/0003/0008/"; an id above 65 535
is written wide, e.g. 70 000 → "~00011170/".
Trailing slash matters — it makes prefix queries (path LIKE 'parent/%')
safe against false matches like 0001/00012/ matching 0001/0001/.
Implementations§
Source§impl MaterializedPath
impl MaterializedPath
Source§impl MaterializedPath
impl MaterializedPath
pub fn ancestors_of(path: &str) -> Vec<String>
Trait Implementations§
Source§impl Clone for MaterializedPath
impl Clone for MaterializedPath
Source§impl Debug for MaterializedPath
impl Debug for MaterializedPath
impl Eq for MaterializedPath
Source§impl PartialEq for MaterializedPath
impl PartialEq for MaterializedPath
impl StructuralPartialEq for MaterializedPath
Auto Trait Implementations§
impl Freeze for MaterializedPath
impl RefUnwindSafe for MaterializedPath
impl Send for MaterializedPath
impl Sync for MaterializedPath
impl Unpin for MaterializedPath
impl UnsafeUnpin for MaterializedPath
impl UnwindSafe for MaterializedPath
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§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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreCreates a shared type from an unshared type.