pub struct CopyLinkedFiles {
pub source_dir: PathBuf,
pub assets_dir: PathBuf,
pub base_url: String,
pub name_template: String,
pub map: Arc<Mutex<HashMap<String, String>>>,
}Expand description
Copy referenced asset files (image srcs and relative hrefs) into
assets_dir, hash-name them via name_template, and rewrite the AST
node to point at the published URL under base_url. map caches
raw -> url so repeated references hash the file only once.
Fields§
§source_dir: PathBuf§assets_dir: PathBuf§base_url: String§name_template: String§map: Arc<Mutex<HashMap<String, String>>>Implementations§
Trait Implementations§
Source§impl Transformer for CopyLinkedFiles
impl Transformer for CopyLinkedFiles
Auto Trait Implementations§
impl Freeze for CopyLinkedFiles
impl RefUnwindSafe for CopyLinkedFiles
impl Send for CopyLinkedFiles
impl Sync for CopyLinkedFiles
impl Unpin for CopyLinkedFiles
impl UnsafeUnpin for CopyLinkedFiles
impl UnwindSafe for CopyLinkedFiles
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> 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