pub struct RelativeRemapping {
pub context: Option<String>,
pub name: String,
pub path: RelativeRemappingPathBuf,
}Expand description
A relative Remapping that’s aware of the current location
Fields§
§context: Option<String>§name: String§path: RelativeRemappingPathBufImplementations§
Source§impl RelativeRemapping
impl RelativeRemapping
Sourcepub fn new(remapping: Remapping, root: impl AsRef<Path>) -> Self
pub fn new(remapping: Remapping, root: impl AsRef<Path>) -> Self
Creates a new RelativeRemapping starting prefixed with root
Sourcepub fn to_remapping(self, root: PathBuf) -> Remapping
pub fn to_remapping(self, root: PathBuf) -> Remapping
Converts this relative remapping into an absolute remapping
This sets to root of the remapping to the given root path
Sourcepub fn to_relative_remapping(self) -> Remapping
pub fn to_relative_remapping(self) -> Remapping
Converts this relative remapping into Remapping without the root path
Trait Implementations§
Source§impl Clone for RelativeRemapping
impl Clone for RelativeRemapping
Source§fn clone(&self) -> RelativeRemapping
fn clone(&self) -> RelativeRemapping
Returns a duplicate of the value. Read more
1.0.0 · 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 RelativeRemapping
impl Debug for RelativeRemapping
Source§impl<'de> Deserialize<'de> for RelativeRemapping
impl<'de> Deserialize<'de> for RelativeRemapping
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 RelativeRemapping
impl Display for RelativeRemapping
Source§impl From<RelativeRemapping> for Remapping
impl From<RelativeRemapping> for Remapping
Source§fn from(r: RelativeRemapping) -> Self
fn from(r: RelativeRemapping) -> Self
Converts to this type from the input type.
Source§impl From<Remapping> for RelativeRemapping
impl From<Remapping> for RelativeRemapping
Source§impl Ord for RelativeRemapping
impl Ord for RelativeRemapping
Source§fn cmp(&self, other: &RelativeRemapping) -> Ordering
fn cmp(&self, other: &RelativeRemapping) -> Ordering
1.21.0 · 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
Source§impl PartialEq for RelativeRemapping
impl PartialEq for RelativeRemapping
Source§impl PartialOrd for RelativeRemapping
impl PartialOrd for RelativeRemapping
Source§impl Serialize for RelativeRemapping
impl Serialize for RelativeRemapping
impl Eq for RelativeRemapping
impl StructuralPartialEq for RelativeRemapping
Auto Trait Implementations§
impl Freeze for RelativeRemapping
impl RefUnwindSafe for RelativeRemapping
impl Send for RelativeRemapping
impl Sync for RelativeRemapping
impl Unpin for RelativeRemapping
impl UnwindSafe for RelativeRemapping
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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