Struct reinda::ModifierContext
source · pub struct ModifierContext<'a> { /* private fields */ }
Expand description
Passed to the modifier closure, e.g. allowing you to resolve unhashed HTTP paths to hashed ones.
Implementations§
source§impl<'a> ModifierContext<'a>
impl<'a> ModifierContext<'a>
sourcepub fn resolve_path<'b>(&'b self, unhashed_http_path: &'b str) -> &'b str
pub fn resolve_path<'b>(&'b self, unhashed_http_path: &'b str) -> &'b str
Resolves an unhashed HTTP path to the hashed HTTP path.
Panics if the passed unhashed_http_path
was not declared as
dependency in with_modifier
or does not refer to an existing asset.
sourcepub fn dependencies(&self) -> &'a [Cow<'static, str>]
pub fn dependencies(&self) -> &'a [Cow<'static, str>]
Returns the dependencies you passed to EntryBuilder::with_modifier
,
in the same order. This is just for convenience and to avoid cloning
the dependency list.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ModifierContext<'a>
impl<'a> !RefUnwindSafe for ModifierContext<'a>
impl<'a> Send for ModifierContext<'a>
impl<'a> Sync for ModifierContext<'a>
impl<'a> Unpin for ModifierContext<'a>
impl<'a> !UnwindSafe for ModifierContext<'a>
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