pub struct AccessWrapper(/* private fields */);
Expand description
This wrapper class prevents test code from invoking WatchPeers, a hanging-get method which fails if invoked again before the prior invocation has returned. The AccessHarness itself continuously monitors WatchPeers, so if test code is also permitted to invoke WatchPeers, tests could fail (or worse, flake, since the multiple-calls issue is timing-dependent). Instead, test code should check peer state via AccessState.peers.
Implementations§
Source§impl AccessWrapper
impl AccessWrapper
pub fn start_discovery( &self, token: ServerEnd<ProcedureTokenMarker>, ) -> QueryResponseFut<AccessStartDiscoveryResult>
pub fn make_discoverable( &self, token: ServerEnd<ProcedureTokenMarker>, ) -> QueryResponseFut<AccessMakeDiscoverableResult>
pub fn connect(&self, id: &mut PeerId) -> QueryResponseFut<AccessConnectResult>
pub fn disconnect( &self, id: &mut PeerId, ) -> QueryResponseFut<AccessDisconnectResult>
pub fn set_local_name(&self, name: &str) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for AccessWrapper
impl Clone for AccessWrapper
Source§fn clone(&self) -> AccessWrapper
fn clone(&self) -> AccessWrapper
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for AccessWrapper
impl !RefUnwindSafe for AccessWrapper
impl Send for AccessWrapper
impl Sync for AccessWrapper
impl Unpin for AccessWrapper
impl !UnwindSafe for AccessWrapper
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)