pub struct ComplexAttr {
pub ty: TypeHandle,
pub re: APFloat,
pub im: APFloat,
}Fields§
§ty: TypeHandle§re: APFloat§im: APFloatImplementations§
Source§impl ComplexAttr
impl ComplexAttr
Sourcepub fn new(ty: TypeHandle, re: APFloat, im: APFloat) -> Self
pub fn new(ty: TypeHandle, re: APFloat, im: APFloat) -> Self
Constructs a new ComplexAttr.
Source§impl ComplexAttr
impl ComplexAttr
pub fn from_f64(ctx: &Context, ty: TypeHandle, re: f64, im: f64) -> Self
pub fn float_type<'a>(&self, ctx: &'a Context) -> Ref<'a, dyn APFloatType>
Trait Implementations§
Source§impl Attribute for ComplexAttr
impl Attribute for ComplexAttr
Source§fn hash_attr(&self) -> TypeValueHash
fn hash_attr(&self) -> TypeValueHash
Compute and get the hash for this instance of Self.
Hash collisions can be a possibility.
Source§fn get_attr_id(&self) -> AttrId
fn get_attr_id(&self) -> AttrId
Get an Attribute’s static name. This is not per instantnce.
It is mostly useful for printing and parsing the attribute.
Source§fn get_attr_id_static() -> AttrId
fn get_attr_id_static() -> AttrId
Same as get_attr_id, but without the self reference.
Source§impl Clone for ComplexAttr
impl Clone for ComplexAttr
Source§impl ConstantAttr for ComplexAttr
impl ConstantAttr for ComplexAttr
impl Copy for ComplexAttr
Source§impl Debug for ComplexAttr
impl Debug for ComplexAttr
impl Eq for ComplexAttr
Source§impl Hash for ComplexAttr
impl Hash for ComplexAttr
Source§impl MaterializableAttr for ComplexAttr
impl MaterializableAttr for ComplexAttr
Source§impl Parsable for ComplexAttr
impl Parsable for ComplexAttr
Source§type Parsed = ComplexAttr
type Parsed = ComplexAttr
The type of the parsed entity.
Source§fn parse<'a>(
input: &mut StateStream<'a>,
_: Self::Arg,
) -> ParseResult<'a, Self::Parsed>
fn parse<'a>( input: &mut StateStream<'a>, _: Self::Arg, ) -> ParseResult<'a, Self::Parsed>
Define a parser using existing combinators and call
into on Parser::parse_stream to get the final ParseResult.
Use state_stream.state as necessary.Source§fn parser<'a>(
arg: Self::Arg,
) -> Box<dyn Parser<Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'a>>, SourcePosition>>>, State<'a>>, Output = Self::Parsed, PartialState = ()> + 'a>where
Self::Parsed: 'a,
fn parser<'a>(
arg: Self::Arg,
) -> Box<dyn Parser<Stream<Stream<Stream<Stream<IteratorStream<CharIterator<'a>>, SourcePosition>>>, State<'a>>, Output = Self::Parsed, PartialState = ()> + 'a>where
Self::Parsed: 'a,
Get a parser combinator that can work on StateStream as its input.
Source§impl PartialEq for ComplexAttr
impl PartialEq for ComplexAttr
Source§impl Printable for ComplexAttr
impl Printable for ComplexAttr
impl StructuralPartialEq for ComplexAttr
Source§impl TypedAttrInterface for ComplexAttr
impl TypedAttrInterface for ComplexAttr
Source§fn get_type(&self, _ctx: &Context) -> TypeHandle
fn get_type(&self, _ctx: &Context) -> TypeHandle
Get this attribute’s type.
Auto Trait Implementations§
impl Freeze for ComplexAttr
impl RefUnwindSafe for ComplexAttr
impl Send for ComplexAttr
impl Sync for ComplexAttr
impl Unpin for ComplexAttr
impl UnsafeUnpin for ComplexAttr
impl UnwindSafe for ComplexAttr
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more