pub struct IntegerSchema {
pub type_: IntegerTypeConst,
pub title: Option<Cow<'static, str>>,
pub description: Option<Cow<'static, str>>,
pub minimum: Option<i64>,
pub maximum: Option<i64>,
}Expand description
Schema definition for integer properties.
Fields§
§type_: IntegerTypeConst§title: Option<Cow<'static, str>>§description: Option<Cow<'static, str>>§minimum: Option<i64>§maximum: Option<i64>Implementations§
Source§impl IntegerSchema
impl IntegerSchema
pub fn new() -> Self
pub fn with_range(self, min: i64, max: i64) -> Result<Self, &'static str>
pub fn range(self, min: i64, max: i64) -> Self
pub fn minimum(self, min: i64) -> Self
pub fn maximum(self, max: i64) -> Self
pub fn title(self, title: impl Into<Cow<'static, str>>) -> Self
pub fn description(self, description: impl Into<Cow<'static, str>>) -> Self
Trait Implementations§
Source§impl Clone for IntegerSchema
impl Clone for IntegerSchema
Source§fn clone(&self) -> IntegerSchema
fn clone(&self) -> IntegerSchema
Returns a duplicate of the value. Read more
1.0.0 · 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 IntegerSchema
impl Debug for IntegerSchema
Source§impl Default for IntegerSchema
impl Default for IntegerSchema
Source§impl<'de> Deserialize<'de> for IntegerSchema
impl<'de> Deserialize<'de> for IntegerSchema
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 PartialEq for IntegerSchema
impl PartialEq for IntegerSchema
Source§impl Serialize for IntegerSchema
impl Serialize for IntegerSchema
impl StructuralPartialEq for IntegerSchema
Auto Trait Implementations§
impl Freeze for IntegerSchema
impl RefUnwindSafe for IntegerSchema
impl Send for IntegerSchema
impl Sync for IntegerSchema
impl Unpin for IntegerSchema
impl UnwindSafe for IntegerSchema
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