pub enum EvaluationPath {
Local(PathBuf),
Remote(Url),
}Expand description
Represents a path used in evaluation that may be either local or remote.
Variants§
Implementations§
Source§impl EvaluationPath
impl EvaluationPath
Sourcepub fn to_str(&self) -> Option<&str>
pub fn to_str(&self) -> Option<&str>
Gets a string representation of the path.
Returns None if the path is local and cannot be represented in UTF-8.
Sourcepub fn as_local(&self) -> Option<&Path>
pub fn as_local(&self) -> Option<&Path>
Converts the path to a local path.
Returns None if the path is remote.
Sourcepub fn unwrap_local(self) -> PathBuf
pub fn unwrap_local(self) -> PathBuf
Sourcepub fn as_remote(&self) -> Option<&Url>
pub fn as_remote(&self) -> Option<&Url>
Converts the path to a remote URL.
Returns None if the path is local.
Sourcepub fn unwrap_remote(self) -> Url
pub fn unwrap_remote(self) -> Url
Trait Implementations§
Source§impl Clone for EvaluationPath
impl Clone for EvaluationPath
Source§fn clone(&self) -> EvaluationPath
fn clone(&self) -> EvaluationPath
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 EvaluationPath
impl Debug for EvaluationPath
Source§impl FromStr for EvaluationPath
impl FromStr for EvaluationPath
Source§impl PartialEq for EvaluationPath
impl PartialEq for EvaluationPath
Source§impl TryFrom<EvaluationPath> for String
impl TryFrom<EvaluationPath> for String
impl Eq for EvaluationPath
impl StructuralPartialEq for EvaluationPath
Auto Trait Implementations§
impl Freeze for EvaluationPath
impl RefUnwindSafe for EvaluationPath
impl Send for EvaluationPath
impl Sync for EvaluationPath
impl Unpin for EvaluationPath
impl UnwindSafe for EvaluationPath
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> 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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