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>
pub fn new<N, L>(remote: N, local: L) -> Result<Self, ParseError>
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 for ResourcePath
impl PartialEq for ResourcePath
Source§impl PartialOrd for ResourcePath
impl PartialOrd for ResourcePath
Source§impl Serialize for ResourcePath
impl Serialize for ResourcePath
impl Eq for ResourcePath
impl StructuralPartialEq for ResourcePath
Auto Trait Implementations§
impl Freeze for ResourcePath
impl RefUnwindSafe for ResourcePath
impl Send for ResourcePath
impl Sync for ResourcePath
impl Unpin for ResourcePath
impl UnwindSafe for ResourcePath
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