pub struct AssetProcessor { /* private fields */ }Expand description
Asset processor for copying and optionally fingerprinting static files.
Implementations§
Source§impl AssetProcessor
impl AssetProcessor
Sourcepub fn with_fingerprint_extensions(self, extensions: Vec<String>) -> Self
pub fn with_fingerprint_extensions(self, extensions: Vec<String>) -> Self
Set which extensions should be fingerprinted.
Sourcepub fn process(
&self,
source_dir: &Path,
dest_dir: &Path,
) -> Result<AssetManifest>
pub fn process( &self, source_dir: &Path, dest_dir: &Path, ) -> Result<AssetManifest>
Process all assets from source to destination directory.
Sourcepub fn copy_file(source: &Path, dest: &Path) -> Result<()>
pub fn copy_file(source: &Path, dest: &Path) -> Result<()>
Copy a single file without fingerprinting.
Sourcepub fn ensure_dir(path: &Path) -> Result<()>
pub fn ensure_dir(path: &Path) -> Result<()>
Create a directory if it doesn’t exist.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AssetProcessor
impl RefUnwindSafe for AssetProcessor
impl Send for AssetProcessor
impl Sync for AssetProcessor
impl Unpin for AssetProcessor
impl UnwindSafe for AssetProcessor
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> 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