pub struct RemotesConfigPath { /* private fields */ }Expand description
The value of [ex-ostrya] remotes-config-dir: the path of the remotes
directory, as the key holds it.
The path is not empty and holds no NUL byte. A relative path has no ..
component, and it names a directory relative to the repository. A path
that breaks a rule cannot be built. The check of a relative path and of a
.. component follows the path rules of the target platform.
§Examples
use ostrya_core::config::RemotesConfigPath;
assert!(RemotesConfigPath::try_from("/etc/ostree/remotes.d").is_ok());
assert!(RemotesConfigPath::try_from("/etc/../remotes.d").is_ok());
assert!(RemotesConfigPath::try_from("../remotes.d").is_err());
assert!(RemotesConfigPath::try_from("").is_err());Implementations§
Trait Implementations§
Source§impl Clone for RemotesConfigPath
impl Clone for RemotesConfigPath
Source§impl Debug for RemotesConfigPath
impl Debug for RemotesConfigPath
impl Eq for RemotesConfigPath
Source§impl Hash for RemotesConfigPath
impl Hash for RemotesConfigPath
Source§impl PartialEq for RemotesConfigPath
impl PartialEq for RemotesConfigPath
impl StructuralPartialEq for RemotesConfigPath
Source§impl TryFrom<&str> for RemotesConfigPath
impl TryFrom<&str> for RemotesConfigPath
Source§fn try_from(path: &str) -> Result<RemotesConfigPath, ValueError>
fn try_from(path: &str) -> Result<RemotesConfigPath, ValueError>
§Errors
A ValueError if path is empty, holds a NUL byte, or is a
relative path with a .. component.
Source§type Error = ValueError
type Error = ValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for RemotesConfigPath
impl TryFrom<String> for RemotesConfigPath
Source§fn try_from(path: String) -> Result<RemotesConfigPath, ValueError>
fn try_from(path: String) -> Result<RemotesConfigPath, ValueError>
§Errors
A ValueError if path is empty, holds a NUL byte, or is a
relative path with a .. component.
Source§type Error = ValueError
type Error = ValueError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Forget for RemotesConfigPath
impl Freeze for RemotesConfigPath
impl Move for RemotesConfigPath
impl RefUnwindSafe for RemotesConfigPath
impl Send for RemotesConfigPathwhere
RawVecInner: Send,
impl Sync for RemotesConfigPathwhere
RawVecInner: Sync,
impl Unpin for RemotesConfigPath
impl UnsafeUnpin for RemotesConfigPath
impl UnwindSafe for RemotesConfigPathwhere
RawVecInner: UnwindSafe,
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