pub struct ParamSchema {
pub name: String,
pub deprecation: Option<DeprecationInfo>,
}Expand description
Per-parameter metadata for a method’s parameters.
MethodSchema.params already carries the fine-grained JSON Schema for the
combined parameter object. ParamSchema carries orthogonal, parameter-
scoped metadata that doesn’t fit on a JSON Schema node — currently just
deprecation info (IR-5).
The name field matches the parameter identifier in the method signature
so consumers can correlate entries against the params JSON Schema’s
properties map.
Added in IR-5. Defaults to an empty list on MethodSchema so pre-IR
schemas deserialize cleanly.
Fields§
§name: StringParameter name, matching the identifier in the method signature.
deprecation: Option<DeprecationInfo>If set, this parameter is deprecated.
Populated by #[deprecated(...)] (+ optional
#[plexus_macros::removed_in("...")]) on the parameter in the
method signature (IR-5).
Implementations§
Source§impl ParamSchema
impl ParamSchema
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Create a new ParamSchema carrying just a name and no metadata.
Sourcepub fn with_deprecation(self, info: DeprecationInfo) -> Self
pub fn with_deprecation(self, info: DeprecationInfo) -> Self
Attach deprecation metadata for this parameter.
Trait Implementations§
Source§impl Clone for ParamSchema
impl Clone for ParamSchema
Source§fn clone(&self) -> ParamSchema
fn clone(&self) -> ParamSchema
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParamSchema
impl Debug for ParamSchema
Source§impl<'de> Deserialize<'de> for ParamSchema
impl<'de> Deserialize<'de> for ParamSchema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ParamSchema
impl JsonSchema for ParamSchema
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ParamSchema
impl PartialEq for ParamSchema
Source§impl Serialize for ParamSchema
impl Serialize for ParamSchema
impl Eq for ParamSchema
impl StructuralPartialEq for ParamSchema
Auto Trait Implementations§
impl Freeze for ParamSchema
impl RefUnwindSafe for ParamSchema
impl Send for ParamSchema
impl Sync for ParamSchema
impl Unpin for ParamSchema
impl UnsafeUnpin for ParamSchema
impl UnwindSafe for ParamSchema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.