pub struct IgnorableMetadata<T: MetadataKey> {
pub content: AnyView,
pub value: T,
}Expand description
A metadata wrapper that can be safely ignored by renderers if not handled explicitly.
Unlike Metadata<T>, this type won’t panic if not caught by a renderer.
Fields§
§content: AnyViewThe view content wrapped by this ignorable metadata.
value: TThe metadata value associated with the content.
Implementations§
Source§impl<T: MetadataKey> IgnorableMetadata<T>
impl<T: MetadataKey> IgnorableMetadata<T>
Trait Implementations§
Source§impl<T: Debug + MetadataKey> Debug for IgnorableMetadata<T>
impl<T: Debug + MetadataKey> Debug for IgnorableMetadata<T>
Source§impl<T: MetadataKey> View for IgnorableMetadata<T>
impl<T: MetadataKey> View for IgnorableMetadata<T>
Auto Trait Implementations§
impl<T> Freeze for IgnorableMetadata<T>where
T: Freeze,
impl<T> !RefUnwindSafe for IgnorableMetadata<T>
impl<T> !Send for IgnorableMetadata<T>
impl<T> !Sync for IgnorableMetadata<T>
impl<T> Unpin for IgnorableMetadata<T>where
T: Unpin,
impl<T> !UnwindSafe for IgnorableMetadata<T>
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