pub enum UsageContext {
FieldOnly,
BattleOnly,
FieldAndBattle,
None,
}Expand description
Where / whether an item may be used. A neutral engine enum — no game
specifics. Returned by ItemProvider::usable_in
and passed into ItemProvider::apply_effect
/ use_item as the active context.
Variants§
FieldOnly
Usable only from the field (overworld / party menu).
BattleOnly
Usable only inside battle.
FieldAndBattle
Usable both in the field and in battle.
None
Not usable at all (e.g. a plain key item with no effect).
Trait Implementations§
Source§impl Clone for UsageContext
impl Clone for UsageContext
Source§fn clone(&self) -> UsageContext
fn clone(&self) -> UsageContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UsageContext
Source§impl Debug for UsageContext
impl Debug for UsageContext
impl Eq for UsageContext
Source§impl PartialEq for UsageContext
impl PartialEq for UsageContext
impl StructuralPartialEq for UsageContext
Auto Trait Implementations§
impl Freeze for UsageContext
impl RefUnwindSafe for UsageContext
impl Send for UsageContext
impl Sync for UsageContext
impl Unpin for UsageContext
impl UnsafeUnpin for UsageContext
impl UnwindSafe for UsageContext
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