pub struct FileAsset { /* private fields */ }Expand description
A file asset
Implementations§
Source§impl FileAsset
impl FileAsset
Sourcepub fn new(source: FileSource) -> FileAsset
pub fn new(source: FileSource) -> FileAsset
Creates a new file asset
Sourcepub fn with_options(self, options: FileOptions) -> FileAsset
pub fn with_options(self, options: FileOptions) -> FileAsset
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<FileAsset, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FileAsset, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialOrd for FileAsset
impl PartialOrd for FileAsset
Source§impl Serialize for FileAsset
impl Serialize for FileAsset
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl 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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more