pub struct PointerType {
pub addrspace: AddressSpace,
pub pointee: Type,
}Expand description
A pointer to an object in memory
Fields§
§addrspace: AddressSpaceThe address space used by pointers of this type.
pointee: TypeThe type of value located at the pointed-to address
Implementations§
Source§impl PointerType
impl PointerType
Sourcepub fn new_with_address_space(pointee: Type, addrspace: AddressSpace) -> Self
pub fn new_with_address_space(pointee: Type, addrspace: AddressSpace) -> Self
Create a new pointer type to pointee in addrspace
Sourcepub fn addrspace(&self) -> AddressSpace
pub fn addrspace(&self) -> AddressSpace
Returns the address space of this pointer type
Sourcepub fn is_byte_pointer(&self) -> bool
pub fn is_byte_pointer(&self) -> bool
Returns true if this pointer type represents a byte pointer
Trait Implementations§
Source§impl Clone for PointerType
impl Clone for PointerType
Source§fn clone(&self) -> PointerType
fn clone(&self) -> PointerType
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 PointerType
impl Debug for PointerType
Source§impl<'de> Deserialize<'de> for PointerType
impl<'de> Deserialize<'de> for PointerType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PointerType
impl Display for PointerType
Source§impl From<PointerType> for Type
impl From<PointerType> for Type
Source§fn from(ty: PointerType) -> Type
fn from(ty: PointerType) -> Type
Converts to this type from the input type.
Source§impl Hash for PointerType
impl Hash for PointerType
Source§impl PartialEq for PointerType
impl PartialEq for PointerType
Source§impl PrettyPrint for PointerType
impl PrettyPrint for PointerType
Source§fn to_pretty_string(&self) -> String
fn to_pretty_string(&self) -> String
Source§fn pretty_print(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn pretty_print(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Pretty-print this object to the given core::fmt::Formatter. Read more
Source§impl Serialize for PointerType
impl Serialize for PointerType
impl Eq for PointerType
impl StructuralPartialEq for PointerType
Auto Trait Implementations§
impl Freeze for PointerType
impl RefUnwindSafe for PointerType
impl Send for PointerType
impl Sync for PointerType
impl Unpin for PointerType
impl UnwindSafe for PointerType
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