Enum StorageClass Copy item path Source pub enum StorageClass {
Static,
Automatic,
Allocated,
Mapped,
Mmio,
Device,
Function,
Literal,
}Expand description What kind of storage a memory safety instance is, which is class of
spec/safe-memory/04-safety-model.md section 4.1.
It is on meta_begin because judgement J4 writes it when the instance is created, and the
one place it is read afterwards is J6: free is permitted on an allocated instance and on
no other kind, which is what makes freeing a stack address a report rather than a crash in
the allocator.
A global or a static local, which lives as long as the program does.
A local, which lives as long as its block does.
Storage an allocator handed out, and the only kind free may be given.
A mapping, from mmap or its equivalent.
A device register window, where a read is not a read of anything the program wrote.
Storage a device owns, which is what a DMA buffer is while the transfer runs.
A function, which is what the address of one points at.
A string or compound literal, which the implementation may have merged with another.
The class with that name, if there is one.
Every class, in the order document 04 lists them.
Performs copy-assignment from
source.
Read more 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 🔬 This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range.
Read more 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 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.
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 Converts the given value to a
String.
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.