#[repr(C)]pub struct Complex<T> {
pub re: T,
pub im: T,
}🔬This is a nightly-only experimental API. (
complex_numbers #154023)Expand description
A complex number.
Fields§
§re: T🔬This is a nightly-only experimental API. (
complex_numbers #154023)The real component.
im: T🔬This is a nightly-only experimental API. (
complex_numbers #154023)The imaginary component.
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for Complex<T>
impl<T: Clone> Clone for Complex<T>
Source§fn clone(&self) -> Complex<T>
fn clone(&self) -> Complex<T>
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)where
Self:,
fn clone_from(&mut self, source: &Self)where
Self:,
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Performs copy-assignment from
source. Read moreimpl<T: Copy> Copy for Complex<T>
Source§impl<T: PartialEq> PartialEq for Complex<T>
impl<T: PartialEq> PartialEq for Complex<T>
impl<T: PartialEq> StructuralPartialEq for Complex<T>
Auto Trait Implementations§
impl<T> Freeze for Complex<T>where
T: Freeze,
impl<T> RefUnwindSafe for Complex<T>where
T: RefUnwindSafe,
impl<T> Send for Complex<T>where
T: Send,
impl<T> Sync for Complex<T>where
T: Sync,
impl<T> Unpin for Complex<T>where
T: Unpin,
impl<T> UnsafeUnpin for Complex<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Complex<T>where
T: UnwindSafe,
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
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Mutably borrows from an owned value. Read more