pub struct RemoteServiceMock { /* private fields */ }
Expand description
Provides a simple mock implementation of fuchsia.bluetooth.gatt2.RemoteService
.
Implementations§
Source§impl RemoteServiceMock
impl RemoteServiceMock
pub fn new( timeout: MonotonicDuration, ) -> Result<(RemoteServiceProxy, RemoteServiceMock), Error>
pub fn from_stream( stream: RemoteServiceRequestStream, timeout: MonotonicDuration, ) -> RemoteServiceMock
pub async fn expect_discover_characteristics( &mut self, characteristics: &Vec<Characteristic>, ) -> Result<(), Error>
Sourcepub async fn expect_read_by_type(
&mut self,
expected_uuid: Uuid,
result: Result<&[ReadByTypeResult], Error>,
) -> Result<(), Error>
pub async fn expect_read_by_type( &mut self, expected_uuid: Uuid, result: Result<&[ReadByTypeResult], Error>, ) -> Result<(), Error>
Wait until a Read By Type message is received with the given uuid
. result
will be sent
in response to the matching FIDL request.
pub async fn expect_register_characteristic_notifier( &mut self, handle: Handle, ) -> Result<ClientEnd<CharacteristicNotifierMarker>, Error>
Auto Trait Implementations§
impl Freeze for RemoteServiceMock
impl !RefUnwindSafe for RemoteServiceMock
impl Send for RemoteServiceMock
impl Sync for RemoteServiceMock
impl Unpin for RemoteServiceMock
impl !UnwindSafe for RemoteServiceMock
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