Struct inkwell::AddressSpace
source · pub struct AddressSpace(/* private fields */);
Expand description
Defines the address space in which a global will be inserted.
The default address space is zero. An address space can always be created from a u16
:
inkwell::AddressSpace::from(1u16);
An Address space is a 24-bit number. To convert from a u32, use the TryFrom
instance
inkwell::AddressSpace::try_from(42u32).expect("fits in 24-bit unsigned int");
§Remarks
See also: https://llvm.org/doxygen/NVPTXBaseInfo_8h_source.html
Trait Implementations§
source§impl Clone for AddressSpace
impl Clone for AddressSpace
source§fn clone(&self) -> AddressSpace
fn clone(&self) -> AddressSpace
Returns a copy 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 AddressSpace
impl Debug for AddressSpace
source§impl Default for AddressSpace
impl Default for AddressSpace
source§impl From<u16> for AddressSpace
impl From<u16> for AddressSpace
source§impl PartialEq for AddressSpace
impl PartialEq for AddressSpace
source§fn eq(&self, other: &AddressSpace) -> bool
fn eq(&self, other: &AddressSpace) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u32> for AddressSpace
impl TryFrom<u32> for AddressSpace
impl Copy for AddressSpace
impl Eq for AddressSpace
impl StructuralPartialEq for AddressSpace
Auto Trait Implementations§
impl Freeze for AddressSpace
impl RefUnwindSafe for AddressSpace
impl Send for AddressSpace
impl Sync for AddressSpace
impl Unpin for AddressSpace
impl UnwindSafe for AddressSpace
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more