pub struct PathMapping { /* private fields */ }Expand description
A validated mapping of a source path to a destination path.
Used for mapping secret templates (input) to their materialized locations (output).
Implementations§
Source§impl PathMapping
impl PathMapping
Sourcepub fn try_new(
src: CanonicalPath,
dst: AbsolutePath,
) -> Result<Self, SecretError>
pub fn try_new( src: CanonicalPath, dst: AbsolutePath, ) -> Result<Self, SecretError>
Creates a new mapping where the source MUST exist.
This calls canon() on the source, ensuring it is a valid path on disk.
The destination does not need to exist, so it is only made absolute.
pub fn src(&self) -> &CanonicalPath
pub fn dst(&self) -> &AbsolutePath
Trait Implementations§
Source§impl Clone for PathMapping
impl Clone for PathMapping
Source§impl Debug for PathMapping
impl Debug for PathMapping
Source§impl<'de> Deserialize<'de> for PathMapping
impl<'de> Deserialize<'de> for PathMapping
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 FromStr for PathMapping
impl FromStr for PathMapping
Source§impl Serialize for PathMapping
impl Serialize for PathMapping
Source§impl TryFromKv for PathMapping
impl TryFromKv for PathMapping
type Err = SecretError
fn try_from_kv(key: String, val: String) -> Result<Self, SecretError>
Auto Trait Implementations§
impl Forget for PathMapping
impl Freeze for PathMapping
impl Move for PathMapping
impl RefUnwindSafe for PathMapping
impl Send for PathMapping
impl Sync for PathMapping
impl Unpin for PathMapping
impl UnsafeUnpin for PathMapping
impl UnwindSafe for PathMapping
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more