pub struct ByteCount(/* private fields */);Expand description
A count of input, output, event, checkpoint, or artifact bytes.
The JSON wire form is a canonical unsigned decimal string. Arithmetic is available only through checked methods, so release builds cannot silently wrap accounting values.
Implementations§
Source§impl ByteCount
impl ByteCount
Sourcepub const fn checked_add(self, other: Self) -> Option<Self>
pub const fn checked_add(self, other: Self) -> Option<Self>
Adds two counts, returning None on overflow.
Sourcepub const fn checked_sub(self, other: Self) -> Option<Self>
pub const fn checked_sub(self, other: Self) -> Option<Self>
Subtracts two counts, returning None on underflow.
Sourcepub const fn checked_mul(self, multiplier: u64) -> Option<Self>
pub const fn checked_mul(self, multiplier: u64) -> Option<Self>
Multiplies a count by an integer, returning None on overflow.
Trait Implementations§
impl Copy for ByteCount
Source§impl<'de> Deserialize<'de> for ByteCount
impl<'de> Deserialize<'de> for ByteCount
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
impl Eq for ByteCount
Source§impl JsonSchema for ByteCount
impl JsonSchema for ByteCount
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(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn 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 Ord for ByteCount
impl Ord for ByteCount
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ByteCount
impl PartialOrd for ByteCount
impl StructuralPartialEq for ByteCount
Auto Trait Implementations§
impl Forget for ByteCount
impl Freeze for ByteCount
impl Move for ByteCount
impl RefUnwindSafe for ByteCount
impl Send for ByteCount
impl Sync for ByteCount
impl Unpin for ByteCount
impl UnsafeUnpin for ByteCount
impl UnwindSafe for ByteCount
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