Enum clarinet_files::FileLocation
source · pub enum FileLocation {
FileSystem {
path: PathBuf,
},
Url {
url: Url,
},
}Variants§
Implementations§
source§impl FileLocation
impl FileLocation
pub fn try_parse( location_string: &str, project_root_location_hint: Option<&FileLocation> ) -> Option<FileLocation>
pub fn from_path(path: PathBuf) -> FileLocation
pub fn from_url(url: Url) -> FileLocation
pub fn from_url_string(url_string: &str) -> Result<FileLocation, String>
pub fn from_path_string(path_string: &str) -> Result<FileLocation, String>
pub fn append_path(&mut self, path_string: &str) -> Result<(), String>
pub fn read_content_as_utf8(&self) -> Result<String, String>
pub async fn get_project_manifest_location( &self, file_accessor: Option<&dyn FileAccessor> ) -> Result<FileLocation, String>
pub fn get_project_root_location(&self) -> Result<FileLocation, String>
pub fn get_parent_location(&self) -> Result<FileLocation, String>
pub fn get_network_manifest_location( &self, network: &StacksNetwork ) -> Result<FileLocation, String>
pub fn get_relative_path_from_base( &self, base_location: &FileLocation ) -> Result<String, String>
pub fn get_relative_location(&self) -> Result<String, String>
pub fn get_file_name(&self) -> Option<String>
Trait Implementations§
source§impl Clone for FileLocation
impl Clone for FileLocation
source§fn clone(&self) -> FileLocation
fn clone(&self) -> FileLocation
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 FileLocation
impl Debug for FileLocation
source§impl<'de> Deserialize<'de> for FileLocation
impl<'de> Deserialize<'de> for FileLocation
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 FileLocation
impl Display for FileLocation
source§impl Hash for FileLocation
impl Hash for FileLocation
source§impl PartialEq for FileLocation
impl PartialEq for FileLocation
source§fn eq(&self, other: &FileLocation) -> bool
fn eq(&self, other: &FileLocation) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for FileLocation
impl Serialize for FileLocation
impl Eq for FileLocation
impl StructuralEq for FileLocation
impl StructuralPartialEq for FileLocation
Auto Trait Implementations§
impl RefUnwindSafe for FileLocation
impl Send for FileLocation
impl Sync for FileLocation
impl Unpin for FileLocation
impl UnwindSafe for FileLocation
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.