chore: add #[non_exhaustive] to remaining public structs (#768)
* chore: add #[non_exhaustive] to remaining public structs * chore: add #[non_exhaustive] to remaining public types * chore: enable exhaustive_structs/enums clippy lints * test: add untagged ServerResult deserialization regression tests
This commit is contained in:
parent
ee1c63c53f
commit
6a3b32d3ab
1 changed files with 430 additions and 211 deletions
|
|
@ -307,6 +307,7 @@ type Responder<T> = tokio::sync::oneshot::Sender<T>;
|
|||
///
|
||||
/// or wait for response by call [`RequestHandle::await_response`]
|
||||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
pub struct RequestHandle<R: ServiceRole> {
|
||||
pub rx: tokio::sync::oneshot::Receiver<Result<R::PeerResp, ServiceError>>,
|
||||
pub options: PeerRequestOptions,
|
||||
|
|
@ -398,6 +399,7 @@ impl<R: ServiceRole> std::fmt::Debug for Peer<R> {
|
|||
type ProxyOutbound<R> = mpsc::Receiver<PeerSinkMessage<R>>;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
#[non_exhaustive]
|
||||
pub struct PeerRequestOptions {
|
||||
pub timeout: Option<Duration>,
|
||||
pub meta: Option<Meta>,
|
||||
|
|
@ -648,6 +650,7 @@ pub enum QuitReason {
|
|||
|
||||
/// Request execution context
|
||||
#[derive(Debug, Clone)]
|
||||
#[non_exhaustive]
|
||||
pub struct RequestContext<R: ServiceRole> {
|
||||
/// this token will be cancelled when the [`CancelledNotification`] is received.
|
||||
pub ct: CancellationToken,
|
||||
|
|
@ -673,6 +676,7 @@ impl<R: ServiceRole> RequestContext<R> {
|
|||
|
||||
/// Request execution context
|
||||
#[derive(Debug, Clone)]
|
||||
#[non_exhaustive]
|
||||
pub struct NotificationContext<R: ServiceRole> {
|
||||
pub meta: Meta,
|
||||
pub extensions: Extensions,
|
||||
|
|
|
|||
Loading…
Reference in a new issue