pub enum Resource {
Url(Url),
PathBuf(PathBuf),
}
Expand description
An enum wrapping the two common fetchers PathBuf
and Url
. This
is more efficient than using Box<dyn Fetcher>
.
Variants§
Url(Url)
Fetcher for a URL, either for an online http(s)://
resource
or for a file://
PathBuf(PathBuf)
Fetcher for a local file path
Implementations§
Trait Implementations§
Source§impl Ord for Resource
impl Ord for Resource
Source§impl PartialOrd for Resource
impl PartialOrd for Resource
impl Eq for Resource
impl StructuralPartialEq for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)