pub struct MockRpcServerImpl { /* private fields */ }
Expand description
This extra struct is necessary in order to comply with mockall’s requirements regarding the parameter lifetimes see https://github.com/asomers/mockall/issues/571
Implementations§
Source§impl MockRpcServerImpl
impl MockRpcServerImpl
pub async fn do_register_endpoint<'a>( &'a self, origin_filter: Option<&'a UUri>, resource_id: u16, request_handler: Arc<dyn RequestHandler>, ) -> Result<(), RegistrationError>
pub async fn do_unregister_endpoint<'a>( &'a self, origin_filter: Option<&'a UUri>, resource_id: u16, request_handler: Arc<dyn RequestHandler>, ) -> Result<(), RegistrationError>
Sourcepub fn expect_do_register_endpoint(&mut self) -> &mut Expectation
pub fn expect_do_register_endpoint(&mut self) -> &mut Expectation
Create an Expectation
for mocking the do_register_endpoint
method
Sourcepub fn expect_do_unregister_endpoint(&mut self) -> &mut Expectation
pub fn expect_do_unregister_endpoint(&mut self) -> &mut Expectation
Create an Expectation
for mocking the do_unregister_endpoint
method
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new
method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new
method can still be called
like <MockX as TraitY>::new
Trait Implementations§
Source§impl Default for MockRpcServerImpl
impl Default for MockRpcServerImpl
Source§impl RpcServer for MockRpcServerImpl
This delegates the invocation of the UTransport functions to the mocked functions of the Transport struct.
see https://github.com/asomers/mockall/issues/571
impl RpcServer for MockRpcServerImpl
This delegates the invocation of the UTransport functions to the mocked functions of the Transport struct. see https://github.com/asomers/mockall/issues/571