pub enum AddressType {
U32 = 0,
U64 = 1,
}Expand description
The type used for addressing storage types in a kernel.
This is the type usize maps to when used in a kernel, with isize being mapped to the signed
equivalent.
Variants§
Implementations§
Source§impl AddressType
impl AddressType
Sourcepub fn from_len(num_elems: usize) -> Self
pub fn from_len(num_elems: usize) -> Self
Pick an address type based on the number of elements in a buffer.
Sourcepub fn from_len_signed(num_elems: usize) -> Self
pub fn from_len_signed(num_elems: usize) -> Self
Pick an address type based on the number of elements in a buffer, for a kernel that requires signed indices.
pub fn register(&self, scope: &mut Scope)
pub fn unsigned_type(&self) -> StorageType
pub fn signed_type(&self) -> StorageType
Trait Implementations§
Source§impl Clone for AddressType
impl Clone for AddressType
Source§fn clone(&self) -> AddressType
fn clone(&self) -> AddressType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AddressType
impl Debug for AddressType
Source§impl Default for AddressType
impl Default for AddressType
Source§fn default() -> AddressType
fn default() -> AddressType
Returns the “default value” for a type. Read more
Source§impl Display for AddressType
impl Display for AddressType
Source§impl Hash for AddressType
impl Hash for AddressType
Source§impl Ord for AddressType
impl Ord for AddressType
Source§fn cmp(&self, other: &AddressType) -> Ordering
fn cmp(&self, other: &AddressType) -> Ordering
1.21.0 · 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
Source§impl PartialEq for AddressType
impl PartialEq for AddressType
Source§impl PartialOrd for AddressType
impl PartialOrd for AddressType
impl Copy for AddressType
impl Eq for AddressType
impl StructuralPartialEq for AddressType
Auto Trait Implementations§
impl Freeze for AddressType
impl RefUnwindSafe for AddressType
impl Send for AddressType
impl Sync for AddressType
impl Unpin for AddressType
impl UnwindSafe for AddressType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.