pub struct MetaMap { /* private fields */ }Expand description
Typed metadata bag for routes/routers (one value per TypeId; last insert wins).
Implementations§
Source§impl MetaMap
impl MetaMap
pub fn new() -> Self
pub fn insert<T: RouteValue>(&mut self, value: T)
pub fn get<T: RouteValue>(&self) -> Option<Arc<T>>
Sourcepub fn extend(&mut self, other: MetaMap)
pub fn extend(&mut self, other: MetaMap)
Merge another map; later values overwrite the same TypeId.
pub fn is_empty(&self) -> bool
pub fn check_all(&self, ctx: &BuildCtx<'_>) -> Result<(), String>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MetaMap
impl !UnwindSafe for MetaMap
impl Freeze for MetaMap
impl Send for MetaMap
impl Sync for MetaMap
impl Unpin for MetaMap
impl UnsafeUnpin for MetaMap
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