pub struct MockState {
pub written: Mutex<HashMap<String, Value>>,
pub fail: AtomicBool,
pub clock: Mutex<Option<f64>>,
pub version: AtomicU64,
}Expand description
What the drivers of one PLC share: written values, fail (open, read and write fail like a lost connection),
a settable clock (seconds; None = real time) and the tag table version.
Fields§
§written: Mutex<HashMap<String, Value>>Written values by canonical leaf path, lowercase.
fail: AtomicBoolOpen, read and write fail like a lost connection.
clock: Mutex<Option<f64>>The clock in seconds since the epoch; None reads the real time.
version: AtomicU64The tag table version.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MockState
impl RefUnwindSafe for MockState
impl Send for MockState
impl Sync for MockState
impl Unpin for MockState
impl UnsafeUnpin for MockState
impl UnwindSafe for MockState
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