Enum BehaviorRefusal
#[non_exhaustive]pub enum BehaviorRefusal {
NoBrain,
UnknownActivity(Activity),
BadDuration {
min: i32,
max: i32,
},
}Expand description
Why BehaviorRegistrar::add refused.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoBrain
The entity type has no brain (Behavior runs nowhere on it).
UnknownActivity(Activity)
The species’ brain has no slot for the activity.
BadDuration
The duration window is not one vanilla’s nextInt(max + 1 - min)
draws: it needs min >= 0 and 1 <= max + 1 - min <= i32::MAX.
Trait Implementations§
§impl Clone for BehaviorRefusal
impl Clone for BehaviorRefusal
§fn clone(&self) -> BehaviorRefusal
fn clone(&self) -> BehaviorRefusal
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 BehaviorRefusal
§impl Debug for BehaviorRefusal
impl Debug for BehaviorRefusal
§impl Display for BehaviorRefusal
impl Display for BehaviorRefusal
impl Eq for BehaviorRefusal
§impl Error for BehaviorRefusal
impl Error for BehaviorRefusal
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl PartialEq for BehaviorRefusal
impl PartialEq for BehaviorRefusal
impl StructuralPartialEq for BehaviorRefusal
Auto Trait Implementations§
impl Freeze for BehaviorRefusal
impl RefUnwindSafe for BehaviorRefusal
impl Send for BehaviorRefusal
impl Sync for BehaviorRefusal
impl Unpin for BehaviorRefusal
impl UnsafeUnpin for BehaviorRefusal
impl UnwindSafe for BehaviorRefusal
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