pub struct Id {
pub raw: String,
pub dir: PageDir,
}Expand description
A wiki page id with its routing dir resolved.
Construction is restricted to Id::parse, which enforces the slug
grammar (ent|con|syn)-[a-z0-9]+(-[a-z0-9]+)* — no .., /, \,
uppercase, NUL, or any character outside [a-z0-9-]. This makes the
id structurally safe to interpolate into a filesystem path.
Fields§
§raw: StringFull id including the prefix (e.g. ent-redis).
dir: PageDirDirectory derived from the id prefix.
Implementations§
Trait Implementations§
impl Eq for Id
impl StructuralPartialEq for Id
Auto Trait Implementations§
impl Freeze for Id
impl RefUnwindSafe for Id
impl Send for Id
impl Sync for Id
impl Unpin for Id
impl UnsafeUnpin for Id
impl UnwindSafe for Id
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.