pub struct JsonInteger(/* private fields */);Expand description
A JSON integer retained without an implementation-width bound.
The final schema uses JSON Schema’s integer type, which is not limited to
Rust’s fixed-width integer types. The workspace enables serde_json’s
arbitrary-precision feature, so retaining the original serde_json::Number
preserves both large positive and negative integer spellings on re-encode.
Implementations§
Source§impl JsonInteger
impl JsonInteger
Sourcepub fn try_from_number(value: Number) -> Result<Self, CommonTypeError>
pub fn try_from_number(value: Number) -> Result<Self, CommonTypeError>
Admits one JSON number only when it is a mathematical integer.
Trait Implementations§
Source§impl Clone for JsonInteger
impl Clone for JsonInteger
Source§fn clone(&self) -> JsonInteger
fn clone(&self) -> JsonInteger
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonInteger
impl Debug for JsonInteger
Source§impl<'de> Deserialize<'de> for JsonInteger
impl<'de> Deserialize<'de> for JsonInteger
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for JsonInteger
impl Display for JsonInteger
impl Eq for JsonInteger
Source§impl From<JsonInteger> for ProgressMarker
impl From<JsonInteger> for ProgressMarker
Source§fn from(n: JsonInteger) -> Self
fn from(n: JsonInteger) -> Self
Converts to this type from the input type.
Source§impl From<JsonInteger> for ElicitContentValue
impl From<JsonInteger> for ElicitContentValue
Source§fn from(v: JsonInteger) -> Self
fn from(v: JsonInteger) -> Self
Converts to this type from the input type.
Source§impl From<McpErrorCode> for JsonInteger
impl From<McpErrorCode> for JsonInteger
Source§fn from(value: McpErrorCode) -> Self
fn from(value: McpErrorCode) -> Self
Converts to this type from the input type.
Source§impl From<i32> for JsonInteger
impl From<i32> for JsonInteger
Source§impl From<i64> for JsonInteger
impl From<i64> for JsonInteger
Source§impl From<u64> for JsonInteger
impl From<u64> for JsonInteger
Source§impl FromStr for JsonInteger
impl FromStr for JsonInteger
Source§impl PartialEq for JsonInteger
impl PartialEq for JsonInteger
Source§impl Serialize for JsonInteger
impl Serialize for JsonInteger
impl StructuralPartialEq for JsonInteger
Source§impl TryFrom<&str> for JsonInteger
impl TryFrom<&str> for JsonInteger
Source§impl TryFrom<JsonInteger> for CacheTtl
impl TryFrom<JsonInteger> for CacheTtl
Source§type Error = CacheTtlConversionError
type Error = CacheTtlConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for JsonInteger
impl RefUnwindSafe for JsonInteger
impl Send for JsonInteger
impl Sync for JsonInteger
impl Unpin for JsonInteger
impl UnsafeUnpin for JsonInteger
impl UnwindSafe for JsonInteger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).