pub struct StringAttribute<'c> { /* private fields */ }
Expand description

A string attribute.

Implementations§

source§

impl<'c> StringAttribute<'c>

source

pub fn new(context: &'c Context, string: &str) -> Self

Creates a string attribute.

source

pub fn value(&self) -> &'c str

Returns a value.

Trait Implementations§

source§

impl<'c> AttributeLike<'c> for StringAttribute<'c>

source§

fn to_raw(&self) -> MlirAttribute

Converts a attribute into a raw object.
source§

fn context(&self) -> ContextRef<'c>

Returns a context.
source§

fn type(&self) -> Type<'_>

Returns a type.
source§

fn type_id(&self) -> TypeId<'c>

Returns a type ID.
source§

fn dump(&self)

Dumps a attribute.
source§

fn is_affine_map(&self) -> bool

Returns true if an attribute is affine map.
source§

fn is_array(&self) -> bool

Returns true if an attribute is array.
source§

fn is_bool(&self) -> bool

Returns true if an attribute is bool.
source§

fn is_dense_bool_array(&self) -> bool

Returns true if an attribute is dense bool array.
source§

fn is_dense_elements(&self) -> bool

Returns true if an attribute is dense elements.
source§

fn is_dense_f32_array(&self) -> bool

Returns true if an attribute is dense f32 array.
source§

fn is_dense_f64_array(&self) -> bool

Returns true if an attribute is dense f64 array.
source§

fn is_dense_fp_elements(&self) -> bool

Returns true if an attribute is dense fp elements.
source§

fn is_dense_i16_array(&self) -> bool

Returns true if an attribute is dense i16 array.
source§

fn is_dense_i32_array(&self) -> bool

Returns true if an attribute is dense i32 array.
source§

fn is_dense_i64_array(&self) -> bool

Returns true if an attribute is dense i64 array.
source§

fn is_dense_i8_array(&self) -> bool

Returns true if an attribute is dense i8 array.
source§

fn is_dense_int_elements(&self) -> bool

Returns true if an attribute is dense int elements.
source§

fn is_dictionary(&self) -> bool

Returns true if an attribute is dictionary.
source§

fn is_elements(&self) -> bool

Returns true if an attribute is elements.
source§

fn is_flat_symbol_ref(&self) -> bool

Returns true if an attribute is flat symbol ref.
source§

fn is_float(&self) -> bool

Returns true if an attribute is float.
source§

fn is_integer(&self) -> bool

Returns true if an attribute is integer.
source§

fn is_integer_set(&self) -> bool

Returns true if an attribute is integer set.
source§

fn is_opaque(&self) -> bool

Returns true if an attribute is opaque.
source§

fn is_sparse_elements(&self) -> bool

Returns true if an attribute is sparse elements.
source§

fn is_sparse_tensor_encoding_attr(&self) -> bool

Returns true if an attribute is sparse tensor encoding attr.
source§

fn is_strided_layout(&self) -> bool

Returns true if an attribute is strided layout.
source§

fn is_string(&self) -> bool

Returns true if an attribute is string.
source§

fn is_symbol_ref(&self) -> bool

Returns true if an attribute is symbol ref.
source§

fn is_type(&self) -> bool

Returns true if an attribute is type.
source§

fn is_unit(&self) -> bool

Returns true if an attribute is unit.
source§

impl<'c> Clone for StringAttribute<'c>

source§

fn clone(&self) -> StringAttribute<'c>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'c> Debug for StringAttribute<'c>

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'c> Display for StringAttribute<'c>

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'c> From<StringAttribute<'c>> for Attribute<'c>

source§

fn from(value: StringAttribute<'c>) -> Self

Converts to this type from the input type.
source§

impl<'c> TryFrom<Attribute<'c>> for StringAttribute<'c>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(attribute: Attribute<'c>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'c> Copy for StringAttribute<'c>

Auto Trait Implementations§

§

impl<'c> RefUnwindSafe for StringAttribute<'c>

§

impl<'c> !Send for StringAttribute<'c>

§

impl<'c> !Sync for StringAttribute<'c>

§

impl<'c> Unpin for StringAttribute<'c>

§

impl<'c> UnwindSafe for StringAttribute<'c>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.