#[repr(i32)]
pub enum MemoryUnit {
    Byte,
    Kilobyte,
    Megabyte,
    Gigabyte,
}
Expand description

Different resolutions supported by the memory related metric types (e.g. MemoryDistributionMetric).

Variants§

§

Byte

1 byte

§

Kilobyte

2^10 bytes

§

Megabyte

2^20 bytes

§

Gigabyte

2^30 bytes

Implementations§

Converts a value in the given unit to bytes.

Arguments
  • value - the value to convert.
Returns

The integer representation of the byte value.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Trait implementation for converting an integer value to a MemoryUnit. This is used in the FFI code. Please note that values should match the ordering of the platform specific side of things (e.g. Kotlin implementation).

The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Create a new handle for an Arc value Read more
Clone a handle Read more
Consume a handle, getting back the initial Arc<>
Get a clone of the Arc<> using a “borrowed” handle. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.