pub struct SafePath(/* private fields */);Expand description
Validated host-filesystem path (path_on_host, kernel_image_path, etc.).
Performs three checks: byte length cap (PATH_MAX = 1024), no NUL bytes, and (for
fields where it applies) parent-traversal rejection. Canonicalization happens at
the consumer (the loader / drive opener), not here — Phase 2 cannot canonicalize
because the file may not exist yet at config-load time.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SafePath
impl<'de> Deserialize<'de> for SafePath
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SafePath
impl StructuralPartialEq for SafePath
Auto Trait Implementations§
impl Freeze for SafePath
impl RefUnwindSafe for SafePath
impl Send for SafePath
impl Sync for SafePath
impl Unpin for SafePath
impl UnsafeUnpin for SafePath
impl UnwindSafe for SafePath
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