ByteSize
Index
Codec
__decode__
__encode__
Returns the encoded
input
__schema__
Returns the JSONSchema corresponding to the decoded type
Formatting
asString
Converts the given value to a String.
Numeric
%
Remainder operator
*
Multiplication operator
+
Addition operator
-
Subtraction operator
/
Division operator
/%
Quotient/Modulo operator
abs
Absolute value. It should satisfy
Numeric['*'](Numeric.abs(x), Numeric.sign(x)) == x
asInt
Converts the given value to a Int.
isNegative
Returns true if the number is negative and false if the number is zero or positive.
isOne
Returns true if self is equal to the multiplicative identity.
isPositive
Returns true if the number is positive and false if the number is zero or negative.
isZero
Returns true if self is equal to the additive identity.
negate
Negates the given value.
one
Returns the additive identity element of
T, 0.
sign
Sign of a number. It should satisfy
TSigned['*'](TSigned.abs(x), TSigned.sign(x)) == x
zero
Returns the additive identity element of
T, 0.
Type
__inspect__
When defined, returns a custom string representation. To be useful, it should be bound to a prototype (ex: Struct)
typeName
Type string representation
asInstance
Try to convert anyValue to enum value or else returns
Option.None
hasInstance
Return
trueif the given value is an instance of the class.
unwrap
Convert a tagged value to the underlying type
wrap
Convert an underlying type to a tagged type
Other
__call__
format
Formats a ByteSize into a human-readable string.
fromInt
parse
Parses a human-readable file size string into a ByteSize.
Returns the decoded
input,Result.OkorResult.Error()