pub struct ValidatedWorldPath(/* private fields */);Expand description
Canonical world key that passed Engine path validation.
This is not a wire path: adapters must decode and canonicalize their own
syntax before constructing this proof type. Bare names like foo and
wire paths like /foo are rejected; adapters map those to canonical worlds
first.
Implementations§
Source§impl ValidatedWorldPath
impl ValidatedWorldPath
Sourcepub fn new(world: impl Into<String>) -> Result<Self, InvalidWorldPath>
pub fn new(world: impl Into<String>) -> Result<Self, InvalidWorldPath>
Validates world as a canonical engine path.
Accepts canonical names like home/foo or var/log/deletes. Rejects
wire paths (/foo), bare names (foo), unknown namespaces, and any
path with ./.. segments.
§Errors
Returns InvalidWorldPath if validation fails.
Trait Implementations§
Source§impl Clone for ValidatedWorldPath
impl Clone for ValidatedWorldPath
Source§fn clone(&self) -> ValidatedWorldPath
fn clone(&self) -> ValidatedWorldPath
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidatedWorldPath
impl Debug for ValidatedWorldPath
Source§impl Display for ValidatedWorldPath
impl Display for ValidatedWorldPath
impl Eq for ValidatedWorldPath
Source§impl Hash for ValidatedWorldPath
impl Hash for ValidatedWorldPath
Source§impl PartialEq for ValidatedWorldPath
impl PartialEq for ValidatedWorldPath
Source§fn eq(&self, other: &ValidatedWorldPath) -> bool
fn eq(&self, other: &ValidatedWorldPath) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ValidatedWorldPath
Auto Trait Implementations§
impl Freeze for ValidatedWorldPath
impl RefUnwindSafe for ValidatedWorldPath
impl Send for ValidatedWorldPath
impl Sync for ValidatedWorldPath
impl Unpin for ValidatedWorldPath
impl UnsafeUnpin for ValidatedWorldPath
impl UnwindSafe for ValidatedWorldPath
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