pub struct DiscoverHandler {
response: DiscoverResponse,
}Expand description
A simple handler for the DiscoverRequest that always returns the same response.
Used to enable discovery/ping functionality and provide version information.
Fields§
§response: DiscoverResponseImplementations§
Source§impl DiscoverHandler
impl DiscoverHandler
Sourcepub fn new(response: DiscoverResponse) -> Self
pub fn new(response: DiscoverResponse) -> Self
Creates a new DiscoverHandler with the given response.
Trait Implementations§
Source§impl RpcHandler for DiscoverHandler
impl RpcHandler for DiscoverHandler
Source§type Request = DiscoverRequest
type Request = DiscoverRequest
The request type that this handler can process.
Source§async fn handle(&self, _request: Self::Request) -> DiscoverResponse
async fn handle(&self, _request: Self::Request) -> DiscoverResponse
Handle the request. Any errors that occur should be defined as part of the
RpcRequest
type.Auto Trait Implementations§
impl Freeze for DiscoverHandler
impl RefUnwindSafe for DiscoverHandler
impl Send for DiscoverHandler
impl Sync for DiscoverHandler
impl Unpin for DiscoverHandler
impl UnsafeUnpin for DiscoverHandler
impl UnwindSafe for DiscoverHandler
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