Give

Struct Give 

Source
pub struct Give { /* private fields */ }

Implementations§

Source§

impl Give

Source

pub fn new<S>(name: S, data: GiveData) -> Self
where S: ToString,

Source

pub fn from_character(&self) -> &str

Source

pub fn to_character(&self) -> &str

Source

pub fn item(&self) -> &str

Trait Implementations§

Source§

impl AsAny for Give

Source§

fn as_any(&self) -> &dyn Any

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Source§

impl Debug for Give

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Give

Source§

fn default() -> Give

Returns the “default value” for a type. Read more
Source§

impl Event for Give

Source§

fn name(&self) -> &str

Source§

fn initiator(&self) -> String

Source§

fn set_initiator(&mut self, initiator: String)

Source§

fn set_world_updates(&mut self, updates: Vec<Box<dyn Change>>)

Source§

fn set_condition(&mut self, condition: Condition)

Source§

fn get_world_updates(&self) -> &[Box<dyn Change>]

Source§

fn get_condition(&self) -> &Condition

Source§

fn dump(&self) -> Value

Source§

fn matches(&self, value: &Value) -> bool

Source§

fn items(&self) -> Vec<String>

Source§

fn characters(&self) -> Vec<String>

Source§

fn msg_base(&self, world: &dyn World) -> String

Source§

fn kind(&self) -> &str

Source§

fn can_be_triggered(&self, world: &dyn World) -> bool

Source§

fn trigger(&mut self, world: &mut dyn World)

Source§

fn perform(&mut self, world: &mut dyn World) -> bool

Source§

fn action_text(&self, world: &dyn World) -> String

Source§

fn success_text(&self, world: &dyn World) -> String

Source§

fn fail_text(&self, world: &dyn World) -> String

Source§

fn sort_key(&self, world: &dyn World) -> (usize, String, String, String)

Source§

fn geo_location( &self, _world: &dyn World, ) -> Option<(String, Option<String>, GeoLocation)>

Can be event be triggered by moving to given geo location
Source§

impl PartialEq<[u8]> for Give

Source§

fn eq(&self, other: &[u8]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Tagged for Give

Source§

fn set_tags(&mut self, tags: Vec<String>)

Source§

fn get_tags(&self) -> Vec<String>

Auto Trait Implementations§

§

impl Freeze for Give

§

impl !RefUnwindSafe for Give

§

impl !Send for Give

§

impl !Sync for Give

§

impl Unpin for Give

§

impl !UnwindSafe for Give

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.