Struct sway_ir::metadata::MetadataIndex
source · pub struct MetadataIndex(pub Index);
Tuple Fields§
§0: Index
Implementations§
source§impl MetadataIndex
impl MetadataIndex
pub fn new_integer(context: &mut Context, int: u64) -> Self
pub fn new_index(context: &mut Context, idx: MetadataIndex) -> Self
pub fn new_string<S: Into<String>>(context: &mut Context, s: S) -> Self
pub fn new_struct<S: Into<String>>(
context: &mut Context,
tag: S,
fields: Vec<Metadatum>
) -> Self
pub fn new_list(context: &mut Context, els: Vec<MetadataIndex>) -> Self
pub fn get_content<'a>(&self, context: &'a Context) -> &'a Metadatum
Trait Implementations§
source§impl Clone for MetadataIndex
impl Clone for MetadataIndex
source§fn clone(&self) -> MetadataIndex
fn clone(&self) -> MetadataIndex
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 MetadataIndex
impl Debug for MetadataIndex
source§impl Hash for MetadataIndex
impl Hash for MetadataIndex
source§impl Ord for MetadataIndex
impl Ord for MetadataIndex
source§fn cmp(&self, other: &MetadataIndex) -> Ordering
fn cmp(&self, other: &MetadataIndex) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<MetadataIndex> for MetadataIndex
impl PartialEq<MetadataIndex> for MetadataIndex
source§fn eq(&self, other: &MetadataIndex) -> bool
fn eq(&self, other: &MetadataIndex) -> bool
source§impl PartialOrd<MetadataIndex> for MetadataIndex
impl PartialOrd<MetadataIndex> for MetadataIndex
source§fn partial_cmp(&self, other: &MetadataIndex) -> Option<Ordering>
fn partial_cmp(&self, other: &MetadataIndex) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more