pub struct ObjectPath(/* private fields */);Expand description
A normalized object path within a knowledge-base bucket.
Rules (D40, §6.12 path normalization):
- One leading
/is stripped if present. - Empty paths and paths that are only
/are rejected. - Empty segments (from
//or trailing/) are rejected. .and..segments are rejected (no resolution — just rejection).- Backslash (
\) and NUL (\0) characters are rejected. - Case and Unicode are preserved verbatim.
- Spaces are valid (S3 permits them).
The stored form has no leading slash and uses / as the separator.
Implementations§
Source§impl ObjectPath
impl ObjectPath
Sourcepub fn try_from_str(input: &str) -> Result<Self, Error>
pub fn try_from_str(input: &str) -> Result<Self, Error>
Validate and construct an ObjectPath from a string slice.
Trait Implementations§
Source§impl AsRef<str> for ObjectPath
impl AsRef<str> for ObjectPath
Source§impl Clone for ObjectPath
impl Clone for ObjectPath
Source§impl Debug for ObjectPath
impl Debug for ObjectPath
Source§impl<'de> Deserialize<'de> for ObjectPath
impl<'de> Deserialize<'de> for ObjectPath
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ObjectPath
impl Display for ObjectPath
impl Eq for ObjectPath
Source§impl Hash for ObjectPath
impl Hash for ObjectPath
Source§impl PartialEq for ObjectPath
impl PartialEq for ObjectPath
Source§impl Serialize for ObjectPath
impl Serialize for ObjectPath
impl StructuralPartialEq for ObjectPath
Source§impl TryFrom<&str> for ObjectPath
impl TryFrom<&str> for ObjectPath
Auto Trait Implementations§
impl Freeze for ObjectPath
impl RefUnwindSafe for ObjectPath
impl Send for ObjectPath
impl Sync for ObjectPath
impl Unpin for ObjectPath
impl UnsafeUnpin for ObjectPath
impl UnwindSafe for ObjectPath
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