Struct Answered
#[non_exhaustive]pub struct Answered<T> {
pub answer: T,
pub mod_id: &'static str,
}Expand description
A replace hook’s answer with the mod that gave it: the dispatch fills in mod_id (the
answering mod’s [mod] id), so no mod can answer for another.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.answer: TThe replace hook’s answer.
mod_id: &'static strThe [mod] id of the mod that answered.
Trait Implementations§
impl<T> Eq for Answered<T>where
T: Eq,
impl<T> StructuralPartialEq for Answered<T>where
T: PartialEq,
Auto Trait Implementations§
impl<T> Freeze for Answered<T>where
T: Freeze,
impl<T> RefUnwindSafe for Answered<T>where
T: RefUnwindSafe,
impl<T> Send for Answered<T>where
T: Send,
impl<T> Sync for Answered<T>where
T: Sync,
impl<T> Unpin for Answered<T>where
T: Unpin,
impl<T> UnsafeUnpin for Answered<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Answered<T>where
T: UnwindSafe,
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