pub enum Input {
Local {
path: PathBuf,
},
External {
url: Url,
},
}Expand description
Wrapper around absolute path to either an internal or external (http://) file
Variants§
Implementations§
Source§impl Input
impl Input
pub fn make_relative(&self, to: &Input) -> Option<String>
Sourcepub fn is_relative(path: &str) -> bool
pub fn is_relative(path: &str) -> bool
check if path is a relative path
Sourcepub fn new(&self, path_string: &str) -> Result<Input, LssgError>
pub fn new(&self, path_string: &str) -> Result<Input, LssgError>
Create a new Input with path relative to self or absolute path
pub fn filestem(&self) -> Result<String, LssgError>
pub fn filename(&self) -> Result<String, LssgError>
pub fn to_string(&self) -> String
pub fn readable(&self) -> Result<Box<dyn Read>, LssgError>
Trait Implementations§
Source§impl TryFrom<&Input> for Stylesheet
impl TryFrom<&Input> for Stylesheet
impl Eq for Input
impl StructuralPartialEq for Input
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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§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.