pub struct FakeTransport {
pub writes: AtomicU64,
/* private fields */
}Expand description
In-memory transport for unit tests.
Fields§
§writes: AtomicU64How many successful write calls occurred.
Implementations§
Source§impl FakeTransport
impl FakeTransport
Sourcepub fn set_available(&self, v: bool)
pub fn set_available(&self, v: bool)
Toggle Transport::available.
Sourcepub fn plant_receipt(&self, receipt: Receipt)
pub fn plant_receipt(&self, receipt: Receipt)
Inject a widget receipt without going through write_receipt.
Sourcepub fn write_count(&self) -> u64
pub fn write_count(&self) -> u64
Snapshot of Self::writes.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FakeTransport
impl RefUnwindSafe for FakeTransport
impl Send for FakeTransport
impl Sync for FakeTransport
impl Unpin for FakeTransport
impl UnsafeUnpin for FakeTransport
impl UnwindSafe for FakeTransport
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