Struct manganis_common::FileAsset
source · pub struct FileAsset { /* private fields */ }
Expand description
A file asset
Implementations§
source§impl FileAsset
impl FileAsset
sourcepub fn new(source: FileSource) -> Self
pub fn new(source: FileSource) -> Self
Creates a new file asset
sourcepub fn with_options(self, options: FileOptions) -> Self
pub fn with_options(self, options: FileOptions) -> Self
Set the file options
sourcepub fn set_url_encoded(&mut self, url_encoded: bool)
pub fn set_url_encoded(&mut self, url_encoded: bool)
Set whether the file asset should be url encoded
sourcepub fn url_encoded(&self) -> bool
pub fn url_encoded(&self) -> bool
Returns whether the file asset should be url encoded
sourcepub fn served_location(&self) -> String
pub fn served_location(&self) -> String
Returns the location where the file asset will be served from
sourcepub fn location(&self) -> &FileLocation
pub fn location(&self) -> &FileLocation
Returns the location of the file asset
sourcepub fn options(&self) -> &FileOptions
pub fn options(&self) -> &FileOptions
Returns the options for the file asset
sourcepub fn with_options_mut(&mut self, f: impl FnOnce(&mut FileOptions))
pub fn with_options_mut(&mut self, f: impl FnOnce(&mut FileOptions))
Returns the options for the file asset mutably
Trait Implementations§
source§impl<'de> Deserialize<'de> for FileAsset
impl<'de> Deserialize<'de> for FileAsset
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 FileAsset
impl PartialEq for FileAsset
source§impl PartialOrd for FileAsset
impl PartialOrd for FileAsset
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 moreimpl StructuralPartialEq for FileAsset
Auto Trait Implementations§
impl Freeze for FileAsset
impl RefUnwindSafe for FileAsset
impl Send for FileAsset
impl Sync for FileAsset
impl Unpin for FileAsset
impl UnwindSafe for FileAsset
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