pub struct Mutable;Expand description
A state for an EventSync to give access to all methods.
Any copy of EventSync with this label will be able to modify any underlying data.
The data changed will affect any EventSync connected to this one.
To create an EventSync<Immutable> , use the .clone_immutable() method on any EventSync with the Mutable label, or clone off an existing Immutable one.
§Example
use event_sync::*;
let tickrate = 10;
let mut master_event_sync = EventSync::new(tickrate);
let mut mutable_event_sync = master_event_sync.clone();
mutable_event_sync.change_tickrate(20);
assert_eq!(master_event_sync.get_tickrate(), 20);Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mutable
impl<'de> Deserialize<'de> for Mutable
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Mutable
impl RefUnwindSafe for Mutable
impl Send for Mutable
impl Sync for Mutable
impl Unpin for Mutable
impl UnwindSafe for Mutable
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