pub struct Recipe<D: RecipeMatches<I> + DowncastType, I: RecipeInput> {
key: Identifier,
recipe_type: &'static RecipeType<D, I>,
data: D,
}Expand description
A keyed recipe with concrete passive data and input types.
Fields§
§key: Identifier§recipe_type: &'static RecipeType<D, I>§data: DImplementations§
Source§impl<D: RecipeMatches<I> + DowncastType, I: RecipeInput> Recipe<D, I>
impl<D: RecipeMatches<I> + DowncastType, I: RecipeInput> Recipe<D, I>
pub const fn new( key: Identifier, recipe_type: &'static RecipeType<D, I>, data: D, ) -> Self
pub const fn key(&self) -> &Identifier
pub const fn recipe_type(&self) -> &'static RecipeType<D, I>
pub const fn data(&self) -> &D
Trait Implementations§
Source§impl<D: RecipeMatches<I> + DowncastType, I: RecipeInput> Debug for Recipe<D, I>
impl<D: RecipeMatches<I> + DowncastType, I: RecipeInput> Debug for Recipe<D, I>
Source§impl<D: RecipeMatches<I> + DowncastType, I: RecipeInput> ErasedRecipe for Recipe<D, I>
impl<D: RecipeMatches<I> + DowncastType, I: RecipeInput> ErasedRecipe for Recipe<D, I>
fn key(&self) -> &Identifier
fn recipe_type(&self) -> RecipeTypeEntryRef
fn data(&self) -> &dyn RecipeData
Auto Trait Implementations§
impl<D, I> Freeze for Recipe<D, I>where
D: Freeze,
impl<D, I> RefUnwindSafe for Recipe<D, I>where
D: RefUnwindSafe,
impl<D, I> Send for Recipe<D, I>
impl<D, I> Sync for Recipe<D, I>
impl<D, I> Unpin for Recipe<D, I>where
D: Unpin,
impl<D, I> UnsafeUnpin for Recipe<D, I>where
D: UnsafeUnpin,
impl<D, I> UnwindSafe for Recipe<D, I>where
D: 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreWraps this value in an
Arc<SyncMutex<>>