pub struct GraphNamespace(/* private fields */);Expand description
Slash-separated namespace of one node inside a root or nested graph.
The empty string identifies the root graph. Non-root segments use the same
bounded grammar as NodeId, which makes the canonical representation safe
for compound database keys without permitting path traversal components.
Implementations§
Source§impl GraphNamespace
impl GraphNamespace
Sourcepub fn new(value: impl Into<String>) -> Result<Self, GraphNamespaceError>
pub fn new(value: impl Into<String>) -> Result<Self, GraphNamespaceError>
Validates and constructs a graph namespace.
§Errors
Returns GraphNamespaceError for an oversized namespace or an empty,
path-like, or otherwise invalid non-root segment.
Trait Implementations§
Source§impl AsRef<str> for GraphNamespace
impl AsRef<str> for GraphNamespace
Source§impl Clone for GraphNamespace
impl Clone for GraphNamespace
Source§impl Debug for GraphNamespace
impl Debug for GraphNamespace
Source§impl Default for GraphNamespace
impl Default for GraphNamespace
Source§impl<'de> Deserialize<'de> for GraphNamespace
impl<'de> Deserialize<'de> for GraphNamespace
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for GraphNamespace
impl Display for GraphNamespace
impl Eq for GraphNamespace
Source§impl FromStr for GraphNamespace
impl FromStr for GraphNamespace
Source§impl Hash for GraphNamespace
impl Hash for GraphNamespace
Source§impl JsonSchema for GraphNamespace
impl JsonSchema for GraphNamespace
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for GraphNamespace
impl Ord for GraphNamespace
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for GraphNamespace
impl PartialEq for GraphNamespace
Source§impl PartialOrd for GraphNamespace
impl PartialOrd for GraphNamespace
Source§impl Serialize for GraphNamespace
impl Serialize for GraphNamespace
impl StructuralPartialEq for GraphNamespace
Source§impl TryFrom<&str> for GraphNamespace
impl TryFrom<&str> for GraphNamespace
Auto Trait Implementations§
impl Forget for GraphNamespace
impl Freeze for GraphNamespace
impl Move for GraphNamespace
impl RefUnwindSafe for GraphNamespace
impl Send for GraphNamespace
impl Sync for GraphNamespace
impl Unpin for GraphNamespace
impl UnsafeUnpin for GraphNamespace
impl UnwindSafe for GraphNamespace
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