Struct I64 Copy item path Source #[repr(C, align(8))]
pub struct I64();
Expand description A signed, 64-bit integer type with explicit alignment requirements
Without the explicit align
representation hint, this type may have different
alignment requirements on different machines. This helps to ensure that the type
has a predictable layout in memory and that operations assuming a particular
alignment value are sound.
Creates a new I64
from a integer value.
§ Endianness
The newly-created instance uses the target machines native endianness by
default. To create this type with an explicitly-specified endianness, use
one of the specialized constructor methods.
Creates a new I64
from a big endian integer value.
Creates a new I64
from an integer, interpreting it
as little endian byte order
Reads a new I64
in little endian byte order
from a chunk of bytes with size 8
Reads a new I64
in big endian byte order
from a chunk of bytes with size 8
Create a native endian integer value from its representation as a byte array in little endian.
Create a native endian integer value from its representation as a byte array in big endian.
Return the memory representation of this integer as a byte array in little-endian byte order.
Return the memory representation of this integer as a byte array in little-endian byte order.
Get the i64
aligned integer in the the specified byte order.
Get the i64
aligned integer in native-endian byte order.
This method uses the target endian value, calculated at compile time, to determine
which byte order serialization variant to use.
Get the i64
aligned integer in little-endian byte order.
Get the i64
aligned integer in big-endian byte order.
Reads an aligned I64
type from a slice of
bytes using the specified endianness.
§ Errors§ ErrorsReturns the
ABI -required minimum alignment of a type in bytes.
Read more Returns the size of a type in bytes.
Read more Returns true
if this type is a ZST, with a size of zero bytes.
Returns the
ABI -required minimum alignment of the type of the value that
val
points to in bytes.
Read more Returns the size of the pointed-to value in bytes at runtime.
Read more Formats the value using the given formatter.
Read more Gets the raw bytes comprising the region of memory this type occupies.
Performs copy-assignment from
source
.
Read more Formats the value using the given formatter.
Read more Returns the “default value” for a type.
Read more The resulting type after dereferencing.
Dereferences the value.
Formats the value using the given formatter.
Read more Converts to this type from the input type.
Converts to this type from the input type.
Inner representation of the
Integer
type.
Returns
true
if this
Integer
type is equal to zero.
Get this
Integer
type as a raw pointer.
Gets the value of this instance at runtime.
Formats the value using the given formatter.
Read more Formats the value using the given formatter.
Read more Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self
and
other
values if one exists.
Read more Tests less than (for
self
and
other
) and is used by the
<
operator.
Read more Tests less than or equal to (for
self
and
other
) and is used by the
<=
operator.
Read more Tests greater than (for
self
and
other
) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self
and
other
) and is used by
the
>=
operator.
Read more Formats the value using the given formatter.
Read more Initializes this type as a contiguous region of memory represented by the
all-zero byte pattern.
Read more Decodes a chunk of bytes into an ABI-compatible type.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit
)
Performs copy-assignment from
self
to
dest
.
Read more Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From <T> for U
chooses to do.
🔬 This is a nightly-only experimental API. (arbitrary_self_types
)
The target type on which the method may be called.
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.