pub struct Complex {
pub re: f64,
pub im: f64,
}Expand description
Go’s complex128.
Fields§
§re: f64§im: f64Trait Implementations§
impl Copy for Complex
Source§impl Decode for Complex
impl Decode for Complex
fn decode_into(&mut self, d: &mut ValueDecoder<'_>, wire: i64) -> Result<()>
Source§impl Encode for Complex
impl Encode for Complex
Source§fn describe_value(&self, d: &mut Describer<'_>) -> Result<i64>
fn describe_value(&self, d: &mut Describer<'_>) -> Result<i64>
The wire type id of this value. For a
GobType this is Self::describe; a dynamic
value describes itself from its contents.Source§fn is_zero(&self) -> bool
fn is_zero(&self) -> bool
Whether Go would omit this value as a struct field (encode.go,
encOpFor): a zero
number or false, an empty string, slice or byte slice, a nil map, pointer or interface.
Structs and arrays are never omitted, even when zero.Source§fn encode(&self, e: &mut ValueEncoder<'_>) -> Result<()>
fn encode(&self, e: &mut ValueEncoder<'_>) -> Result<()>
Write the value itself — no field number, no framing.
Source§fn frames_as_struct(&self) -> bool
fn frames_as_struct(&self) -> bool
Whether this value is framed as a struct at top level and inside an interface. Everything
else, including a type with a marshaler, is a “singleton”: a zero delta, then the value.
impl StructuralPartialEq for Complex
Auto Trait Implementations§
impl Freeze for Complex
impl RefUnwindSafe for Complex
impl Send for Complex
impl Sync for Complex
impl Unpin for Complex
impl UnsafeUnpin for Complex
impl UnwindSafe for Complex
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