Enum veloren_common::recipe::RecipeInput
source · pub enum RecipeInput {
Item(Arc<ItemDef>),
Tag(ItemTag),
TagSameItem(ItemTag),
ListSameItem(Vec<Arc<ItemDef>>),
}
Variants§
Item(Arc<ItemDef>)
Only an item with a matching ItemDef can be used to satisfy this input
Tag(ItemTag)
Any items with this tag can be used to satisfy this input
TagSameItem(ItemTag)
Similar to RecipeInput::Tag(_), but all items must be the same. Specifically this means that a mix of different items with the tag cannot be used. TODO: Currently requires that all items must be in the same slot. Eventually should be reworked so that items can be spread over multiple slots.
ListSameItem(Vec<Arc<ItemDef>>)
List is similar to tag, but has items defined in centralized file Similar to RecipeInput::TagSameItem(_), all items must be the same, they cannot be a mix of different items defined in the list. TODO: Currently requires that all items must be in the same slot. Eventually should be reworked so that items can be spread over multiple slots.
Implementations§
source§impl RecipeInput
impl RecipeInput
Trait Implementations§
source§impl Clone for RecipeInput
impl Clone for RecipeInput
source§fn clone(&self) -> RecipeInput
fn clone(&self) -> RecipeInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RecipeInput
impl Debug for RecipeInput
source§impl<'de> Deserialize<'de> for RecipeInput
impl<'de> Deserialize<'de> for RecipeInput
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for RecipeInput
impl RefUnwindSafe for RecipeInput
impl Send for RecipeInput
impl Sync for RecipeInput
impl Unpin for RecipeInput
impl UnwindSafe for RecipeInput
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
§fn convert_into<F>(
&self,
_: F,
) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
fn convert_into<F>( &self, _: F, ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
Data
) using
entity to marker mapping function§fn convert_from<F>(
data: <C as ConvertSaveload<M>>::Data,
_: F,
) -> Result<C, <C as ConvertSaveload<M>>::Error>
fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F, ) -> Result<C, <C as ConvertSaveload<M>>::Error>
Data
) using
entity to marker mapping function§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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 more