pub enum UnlockReason {
AutoDiscovered,
Manual,
InitialJoin,
}Expand description
Why a recipe was unlocked for a player.
Surfaced in RecipeContext::unlock and on the
RecipeUnlockedEvent so plugins can branch on the source. For
example, an analytics plugin records AutoDiscovered differently
from Manual admin grants; a tutorial plugin only triggers on
InitialJoin.
Variants§
AutoDiscovered
The player crafted (or otherwise encountered) the recipe and the server auto-granted it.
Manual
A plugin or admin command granted the recipe.
InitialJoin
Granted as part of the initial recipe set when the player joined (starter recipes).
Trait Implementations§
Source§impl Clone for UnlockReason
impl Clone for UnlockReason
Source§fn clone(&self) -> UnlockReason
fn clone(&self) -> UnlockReason
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnlockReason
impl Debug for UnlockReason
Source§impl Hash for UnlockReason
impl Hash for UnlockReason
Source§impl PartialEq for UnlockReason
impl PartialEq for UnlockReason
impl Copy for UnlockReason
impl Eq for UnlockReason
impl StructuralPartialEq for UnlockReason
Auto Trait Implementations§
impl Freeze for UnlockReason
impl RefUnwindSafe for UnlockReason
impl Send for UnlockReason
impl Sync for UnlockReason
impl Unpin for UnlockReason
impl UnsafeUnpin for UnlockReason
impl UnwindSafe for UnlockReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.