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
|
|
@ -136,6 +136,7 @@ use crate::{
|
|||
service::{MaybeBoxFuture, MaybeSend},
|
||||
};
|
||||
|
||||
#[non_exhaustive]
|
||||
pub struct ToolRoute<S> {
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub call: Arc<DynCallToolHandler<S>>,
|
||||
|
|
@ -216,6 +217,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[expect(clippy::exhaustive_structs, reason = "intentionally exhaustive")]
|
||||
pub struct ToolAttrGenerateFunctionAdapter;
|
||||
impl<S, F> IntoToolRoute<S, ToolAttrGenerateFunctionAdapter> for F
|
||||
where
|
||||
|
|
@ -251,6 +253,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
pub struct WithToolAttr<C, S, A>
|
||||
where
|
||||
C: CallToolHandler<S, A> + MaybeSend + Clone + 'static,
|
||||
|
|
@ -292,6 +295,7 @@ where
|
|||
}
|
||||
}
|
||||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
pub struct ToolRouter<S> {
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub map: std::collections::HashMap<Cow<'static, str>, ToolRoute<S>>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue