Struct manganis_common::FileLocation
source · pub struct FileLocation { /* private fields */ }
Expand description
The location of an asset before and after it is collected
Implementations§
source§impl FileLocation
impl FileLocation
sourcepub fn unique_name(&self) -> &str
pub fn unique_name(&self) -> &str
Returns the unique name of the file that the asset will be served from
sourcepub fn source(&self) -> &FileSource
pub fn source(&self) -> &FileSource
Returns the source of the file that the asset will be collected from
sourcepub fn read_to_string(&self) -> Result<String>
pub fn read_to_string(&self) -> Result<String>
Reads the file to a string
sourcepub fn read_to_bytes(&self) -> Result<Vec<u8>>
pub fn read_to_bytes(&self) -> Result<Vec<u8>>
Reads the file to bytes
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 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 PartialOrd for FileLocation
impl PartialOrd for FileLocation
source§fn partial_cmp(&self, other: &FileLocation) -> Option<Ordering>
fn partial_cmp(&self, other: &FileLocation) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for FileLocation
impl Serialize for FileLocation
impl StructuralPartialEq for FileLocation
Auto Trait Implementations§
impl Freeze for FileLocation
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