[−][src]Struct iced_x86::MemorySizeInfo
MemorySize
information
Implementations
impl MemorySizeInfo
[src]
#[must_use]pub fn memory_size(&self) -> MemorySize
[src]
Gets the MemorySize
value
Examples
use iced_x86::*; let info = MemorySize::Packed256_UInt16.info(); assert_eq!(MemorySize::Packed256_UInt16, info.memory_size());
#[must_use]pub fn size(&self) -> usize
[src]
Gets the size in bytes of the memory location or 0 if it's not accessed or unknown
Examples
use iced_x86::*; let info = MemorySize::UInt32.info(); assert_eq!(4, info.size()); let info = MemorySize::Packed256_UInt16.info(); assert_eq!(32, info.size()); let info = MemorySize::Broadcast512_UInt64.info(); assert_eq!(8, info.size());
#[must_use]pub fn element_size(&self) -> usize
[src]
Gets the size in bytes of the packed element. If it's not a packed data type, it's equal to size()
.
Examples
use iced_x86::*; let info = MemorySize::UInt32.info(); assert_eq!(4, info.element_size()); let info = MemorySize::Packed256_UInt16.info(); assert_eq!(2, info.element_size()); let info = MemorySize::Broadcast512_UInt64.info(); assert_eq!(8, info.element_size());
#[must_use]pub fn element_type(&self) -> MemorySize
[src]
Gets the element type if it's packed data or the type itself if it's not packed data
Examples
use iced_x86::*; let info = MemorySize::UInt32.info(); assert_eq!(MemorySize::UInt32, info.element_type()); let info = MemorySize::Packed256_UInt16.info(); assert_eq!(MemorySize::UInt16, info.element_type()); let info = MemorySize::Broadcast512_UInt64.info(); assert_eq!(MemorySize::UInt64, info.element_type());
#[must_use]pub fn element_type_info(&self) -> &'static Self
[src]
Gets the element type if it's packed data or the type itself if it's not packed data
Examples
use iced_x86::*; let info = MemorySize::UInt32.info().element_type_info(); assert_eq!(MemorySize::UInt32, info.memory_size()); let info = MemorySize::Packed256_UInt16.info().element_type_info(); assert_eq!(MemorySize::UInt16, info.memory_size()); let info = MemorySize::Broadcast512_UInt64.info().element_type_info(); assert_eq!(MemorySize::UInt64, info.memory_size());
#[must_use]pub fn is_signed(&self) -> bool
[src]
true
if it's signed data (signed integer or a floating point value)
Examples
use iced_x86::*; let info = MemorySize::UInt32.info(); assert!(!info.is_signed()); let info = MemorySize::Int32.info(); assert!(info.is_signed()); let info = MemorySize::Float64.info(); assert!(info.is_signed());
#[must_use]pub fn is_broadcast(&self) -> bool
[src]
true
if it's a broadcast memory type
Examples
use iced_x86::*; let info = MemorySize::UInt32.info(); assert!(!info.is_broadcast()); let info = MemorySize::Packed256_UInt16.info(); assert!(!info.is_broadcast()); let info = MemorySize::Broadcast512_UInt64.info(); assert!(info.is_broadcast());
#[must_use]pub fn is_packed(&self) -> bool
[src]
true
if this is a packed data type, eg. MemorySize::Packed128_Float32
. See also element_count()
Examples
use iced_x86::*; let info = MemorySize::UInt32.info(); assert!(!info.is_packed()); let info = MemorySize::Packed256_UInt16.info(); assert!(info.is_packed()); let info = MemorySize::Broadcast512_UInt64.info(); assert!(!info.is_packed());
#[must_use]pub fn element_count(&self) -> usize
[src]
Gets the number of elements in the packed data type or 1
if it's not packed data (is_packed()
)
Examples
use iced_x86::*; let info = MemorySize::UInt32.info(); assert_eq!(1, info.element_count()); let info = MemorySize::Packed256_UInt16.info(); assert_eq!(16, info.element_count()); let info = MemorySize::Broadcast512_UInt64.info(); assert_eq!(1, info.element_count());
Trait Implementations
impl Clone for MemorySizeInfo
[src]
fn clone(&self) -> MemorySizeInfo
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MemorySizeInfo
[src]
impl Debug for MemorySizeInfo
[src]
impl Eq for MemorySizeInfo
[src]
impl Hash for MemorySizeInfo
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<MemorySizeInfo> for MemorySizeInfo
[src]
fn eq(&self, other: &MemorySizeInfo) -> bool
[src]
fn ne(&self, other: &MemorySizeInfo) -> bool
[src]
impl StructuralEq for MemorySizeInfo
[src]
impl StructuralPartialEq for MemorySizeInfo
[src]
Auto Trait Implementations
impl RefUnwindSafe for MemorySizeInfo
impl Send for MemorySizeInfo
impl Sync for MemorySizeInfo
impl Unpin for MemorySizeInfo
impl UnwindSafe for MemorySizeInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,