pub enum DocumentPath {
Url(Url),
FileName(String),
None,
}
Variants§
Url(Url)
Full url to a file : https://mywebsite/api.yaml
FileName(String)
File name or relative file name
None
json or yaml out of thin silicon
Implementations§
Source§impl DocumentPath
impl DocumentPath
pub fn parse(ref_path: &str) -> Result<Self, LoaderError>
pub fn relate_from(self, refed_from: &Self) -> Result<Self, LoaderError>
pub fn load_raw(&self) -> Result<Value, LoaderError>
Trait Implementations§
Source§impl Clone for DocumentPath
impl Clone for DocumentPath
Source§fn clone(&self) -> DocumentPath
fn clone(&self) -> DocumentPath
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 DocumentPath
impl Debug for DocumentPath
Source§impl Hash for DocumentPath
impl Hash for DocumentPath
Source§impl PartialEq for DocumentPath
impl PartialEq for DocumentPath
impl Eq for DocumentPath
impl StructuralPartialEq for DocumentPath
Auto Trait Implementations§
impl Freeze for DocumentPath
impl RefUnwindSafe for DocumentPath
impl Send for DocumentPath
impl Sync for DocumentPath
impl Unpin for DocumentPath
impl UnwindSafe for DocumentPath
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.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.