Struct cranelift_codegen::ir::constant::ConstantData [−][src]
pub struct ConstantData(_);
Expand description
This type describes the actual constant data. Note that the bytes stored in this structure are expected to be in little-endian order; this is due to ease-of-use when interacting with WebAssembly values, which are little-endian by design.
Implementations
Trait Implementations
impl Clone for ConstantData
[src]
impl Clone for ConstantData
[src]fn clone(&self) -> ConstantData
[src]
fn clone(&self) -> ConstantData
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for ConstantData
[src]
impl Debug for ConstantData
[src]impl Default for ConstantData
[src]
impl Default for ConstantData
[src]fn default() -> ConstantData
[src]
fn default() -> ConstantData
[src]Returns the “default value” for a type. Read more
impl Display for ConstantData
[src]
impl Display for ConstantData
[src]fn fmt(&self, f: &mut Formatter<'_>) -> Result
[src]
fn fmt(&self, f: &mut Formatter<'_>) -> Result
[src]Print the constant data in hexadecimal format, e.g. 0x000102030405060708090a0b0c0d0e0f. This function will flip the stored order of bytes–little-endian–to the more readable big-endian ordering.
use cranelift_codegen::ir::ConstantData; let data = ConstantData::from([3, 2, 1, 0, 0].as_ref()); // note the little-endian order assert_eq!(data.to_string(), "0x0000010203");
impl FromIterator<u8> for ConstantData
[src]
impl FromIterator<u8> for ConstantData
[src]fn from_iter<T: IntoIterator<Item = u8>>(iter: T) -> Self
[src]
fn from_iter<T: IntoIterator<Item = u8>>(iter: T) -> Self
[src]Creates a value from an iterator. Read more
impl FromStr for ConstantData
[src]
impl FromStr for ConstantData
[src]impl Hash for ConstantData
[src]
impl Hash for ConstantData
[src]impl PartialEq<ConstantData> for ConstantData
[src]
impl PartialEq<ConstantData> for ConstantData
[src]fn eq(&self, other: &ConstantData) -> bool
[src]
fn eq(&self, other: &ConstantData) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &ConstantData) -> bool
[src]
fn ne(&self, other: &ConstantData) -> bool
[src]This method tests for !=
.
impl Eq for ConstantData
[src]
impl StructuralEq for ConstantData
[src]
impl StructuralPartialEq for ConstantData
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConstantData
impl Send for ConstantData
impl Sync for ConstantData
impl Unpin for ConstantData
impl UnwindSafe for ConstantData
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more