Struct task_system::ResourcePath
source · pub struct ResourcePath {
pub remote: Url,
pub local: PathBuf,
}
Expand description
A path to a resource, either local or remote.
Fields§
§remote: Url
The network path to the resource.
local: PathBuf
The local path to the resource.
Implementations§
source§impl ResourcePath
impl ResourcePath
sourcepub fn new<N, L>(remote: N, local: L) -> Result<Self, ParseError>where
N: AsRef<str>,
L: AsRef<Path>,
pub fn new<N, L>(remote: N, local: L) -> Result<Self, ParseError>where N: AsRef<str>, L: AsRef<Path>,
Create a new resource path to link remote and local object.
sourcepub fn with_local<P: AsRef<Path>>(self, local: P) -> Self
pub fn with_local<P: AsRef<Path>>(self, local: P) -> Self
Creates a new resource path.
sourcepub fn with_remote<P: AsRef<str>>(self, remote: P) -> Result<Self, ParseError>
pub fn with_remote<P: AsRef<str>>(self, remote: P) -> Result<Self, ParseError>
Creates a new resource path.
Trait Implementations§
source§impl Clone for ResourcePath
impl Clone for ResourcePath
source§fn clone(&self) -> ResourcePath
fn clone(&self) -> ResourcePath
Returns a copy 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 ResourcePath
impl Debug for ResourcePath
source§impl<'de> Deserialize<'de> for ResourcePath
impl<'de> Deserialize<'de> for ResourcePath
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 ResourcePath
impl Display for ResourcePath
source§impl FromStr for ResourcePath
impl FromStr for ResourcePath
source§impl Hash for ResourcePath
impl Hash for ResourcePath
source§impl Ord for ResourcePath
impl Ord for ResourcePath
source§fn cmp(&self, other: &ResourcePath) -> Ordering
fn cmp(&self, other: &ResourcePath) -> 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<ResourcePath> for ResourcePath
impl PartialEq<ResourcePath> for ResourcePath
source§fn eq(&self, other: &ResourcePath) -> bool
fn eq(&self, other: &ResourcePath) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ResourcePath> for ResourcePath
impl PartialOrd<ResourcePath> for ResourcePath
source§fn partial_cmp(&self, other: &ResourcePath) -> Option<Ordering>
fn partial_cmp(&self, other: &ResourcePath) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more