pub struct Positive<T: FloatTrait>(/* private fields */);
Expand description
Positive floating point number
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Positive<f64>
impl<'de> Deserialize<'de> for Positive<f64>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Positive<f64>
impl JsonSchema for Positive<f64>
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(_gen: &mut SchemaGenerator) -> Schema
fn json_schema(_gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn always_inline_schema() -> bool
fn always_inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref
keyword. Read moreSource§impl<T: PartialOrd + FloatTrait> PartialOrd for Positive<T>
impl<T: PartialOrd + FloatTrait> PartialOrd for Positive<T>
impl<T: Copy + FloatTrait> Copy for Positive<T>
impl<T: FloatTrait> StructuralPartialEq for Positive<T>
Auto Trait Implementations§
impl<T> Freeze for Positive<T>where
T: Freeze,
impl<T> RefUnwindSafe for Positive<T>where
T: RefUnwindSafe,
impl<T> Send for Positive<T>where
T: Send,
impl<T> Sync for Positive<T>where
T: Sync,
impl<T> Unpin for Positive<T>where
T: Unpin,
impl<T> UnwindSafe for Positive<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more