Struct eos_rs::api::script_vars::LocalScriptVariableMut
source · pub struct LocalScriptVariableMut<'a>(_, _, _);
Expand description
Mutable reference to a local script variable, see
ScriptVariableRead
and ScriptVariableWrite
.
Trait Implementations§
source§impl<'a> PartialEq<LocalScriptVariableMut<'a>> for LocalScriptVariableMut<'a>
impl<'a> PartialEq<LocalScriptVariableMut<'a>> for LocalScriptVariableMut<'a>
source§impl<'a> ScriptVariableRead for LocalScriptVariableMut<'a>
impl<'a> ScriptVariableRead for LocalScriptVariableMut<'a>
source§fn id(&self) -> ScriptVariableId
fn id(&self) -> ScriptVariableId
Returns the variable ID
source§fn descriptor(&self) -> &script_var
fn descriptor(&self) -> &script_var
Loads a script variable descriptor for a given ID.
source§fn is_local(&self) -> bool
fn is_local(&self) -> bool
Returns whether or not this is a local variable (as opposed to a global one).
source§fn var_type(&self) -> ScriptVariableValueType
fn var_type(&self) -> ScriptVariableValueType
Returns the type of the variable
source§fn capacity(&self) -> usize
fn capacity(&self) -> usize
Returns the number of elements in the array or 1 if it’s not an array.
source§fn value_raw(&self) -> i32
fn value_raw(&self) -> i32
Loads the value of a script variable. If this variable is an array, the value at index 0
is returned. Read more
source§fn value_raw_indexed(&self, index: i32) -> i32
fn value_raw_indexed(&self, index: i32) -> i32
Loads the value of a script variable at some index (for script variables that are arrays). Read more
source§fn value(&self) -> ScriptVariableValue
fn value(&self) -> ScriptVariableValue
Loads the value of a script variable. Read more
source§fn value_indexed(&self, index: i32) -> ScriptVariableValue
fn value_indexed(&self, index: i32) -> ScriptVariableValue
Loads the value of a script variable at some index (for script variables that are arrays). Read more
source§fn sum(&self) -> i32
fn sum(&self) -> i32
Loads the sum of all values of the script variable (for script variables that are
arrays).
source§fn var_eq<S: AsScriptVariableId>(&self, other: S) -> bool
fn var_eq<S: AsScriptVariableId>(&self, other: S) -> bool
Checks if two script variables have equal values. For arrays, compares elementwise for the
length of the first variable. Read more
source§impl<'a> ScriptVariableWrite for LocalScriptVariableMut<'a>
impl<'a> ScriptVariableWrite for LocalScriptVariableMut<'a>
source§fn zero_init(&mut self, var_id: ScriptVariableId)
fn zero_init(&mut self, var_id: ScriptVariableId)
Zero-initialize the values of the given script variable.
source§fn write_raw_indexed(&mut self, index: i32, value: i32)
fn write_raw_indexed(&mut self, index: i32, value: i32)
Writes the given value to a script variable at the given index (if this is an array). Read more
source§fn write(&mut self, value: ScriptVariableValue)
fn write(&mut self, value: ScriptVariableValue)
Writes the given value to a script variable. Read more
source§unsafe fn write_as_scenario(&mut self, value1: u8, value2: u8)
unsafe fn write_as_scenario(&mut self, value1: u8, value2: u8)
Writes to the given variable as if it were a scenario variable. Read more
source§fn write_indexed(&mut self, index: i32, value: ScriptVariableValue)
fn write_indexed(&mut self, index: i32, value: ScriptVariableValue)
Writes the given value to a script variable (if this is an array). Read more
impl<'a> Eq for LocalScriptVariableMut<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for LocalScriptVariableMut<'a>
impl<'a> !Send for LocalScriptVariableMut<'a>
impl<'a> !Sync for LocalScriptVariableMut<'a>
impl<'a> Unpin for LocalScriptVariableMut<'a>
impl<'a> UnwindSafe for LocalScriptVariableMut<'a>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere T: 'static + ?Sized,
source§impl<T> AsScriptVariableId for Twhere
T: ScriptVariableRead,
impl<T> AsScriptVariableId for Twhere T: ScriptVariableRead,
fn as_id(&self) -> script_var_id
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
§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> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere U: From<T>,
source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere Dst: LosslessTryFrom<Src>,
source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere Dst: LossyFrom<Src>,
source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere U: Into<T>,
§impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.