pub struct PointerToMemberType { /* private fields */ }
Expand description
A type for a pointer to a member of a containing type.
Implementations§
Source§impl PointerToMemberType
impl PointerToMemberType
Sourcepub fn member_type<'a, 'input>(
&self,
hash: &'a FileHash<'input>,
) -> Option<Cow<'a, Type<'input>>>
pub fn member_type<'a, 'input>( &self, hash: &'a FileHash<'input>, ) -> Option<Cow<'a, Type<'input>>>
The type of the member.
Sourcepub fn containing_type<'a, 'input>(
&self,
hash: &'a FileHash<'input>,
) -> Option<Cow<'a, Type<'input>>>
pub fn containing_type<'a, 'input>( &self, hash: &'a FileHash<'input>, ) -> Option<Cow<'a, Type<'input>>>
The containing type.
Sourcepub fn byte_size(&self, hash: &FileHash<'_>) -> Option<u64>
pub fn byte_size(&self, hash: &FileHash<'_>) -> Option<u64>
The size in bytes of an instance of this type.
Sourcepub fn cmp_id(
hash_a: &FileHash<'_>,
a: &PointerToMemberType,
hash_b: &FileHash<'_>,
b: &PointerToMemberType,
) -> Ordering
pub fn cmp_id( hash_a: &FileHash<'_>, a: &PointerToMemberType, hash_b: &FileHash<'_>, b: &PointerToMemberType, ) -> Ordering
Compare the identifying information of two types.
Pointer to member types are considered equal if both the member type and containing type are equal.
This can be used to sort, and to determine if two types refer to the same definition (even if there are differences in the definitions).
Trait Implementations§
Source§impl Clone for PointerToMemberType
impl Clone for PointerToMemberType
Source§fn clone(&self) -> PointerToMemberType
fn clone(&self) -> PointerToMemberType
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 PointerToMemberType
impl Debug for PointerToMemberType
Source§impl Default for PointerToMemberType
impl Default for PointerToMemberType
Source§fn default() -> PointerToMemberType
fn default() -> PointerToMemberType
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PointerToMemberType
impl RefUnwindSafe for PointerToMemberType
impl Send for PointerToMemberType
impl Sync for PointerToMemberType
impl Unpin for PointerToMemberType
impl UnwindSafe for PointerToMemberType
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