Expand description
Module containing derive definitions with their corresponding traits along.
Use it in your import paths, if you do want to import derives along with their traits.
Traits§
- The addition operator
+
. - The addition assignment operator
+=
. - Used to do a cheap mutable-to-mutable reference conversion.
- Used to do a cheap reference-to-reference conversion.
b
formatting.- The bitwise AND operator
&
. - The bitwise AND assignment operator
&=
. - The bitwise OR operator
|
. - The bitwise OR assignment operator
|=
. - The bitwise XOR operator
^
. - The bitwise XOR assignment operator
^=
. ?
formatting.- Used for immutable dereferencing operations, like
*v
. - Used for mutable dereferencing operations, like in
*v = 1;
. - Format trait for an empty format,
{}
. - The division operator
/
. - The division assignment operator
/=
. Error
is a trait representing the basic expectations for error values, i.e., values of typeE
inResult<T, E>
.- Used to do value-to-value conversions while consuming the input value. It is the reciprocal of
Into
. - Parse a value from a string
- Used for indexing operations (
container[index]
) in immutable contexts. - Used for indexing operations (
container[index]
) in mutable contexts. - A value-to-value conversion that consumes the input value. The opposite of
From
. - Conversion into an
Iterator
. e
formatting.x
formatting.- The multiplication operator
*
. - The multiplication assignment operator
*=
. - The unary negation operator
-
. - The unary logical negation operator
!
. o
formatting.p
formatting.- Trait to represent types that can be created by multiplying elements of an iterator.
- The remainder operator
%
. - The remainder assignment operator
%=
. - The left shift operator
<<
. Note that because this trait is implemented for all integer types with multiple right-hand-side types, Rust’s type checker has special handling for_ << _
, setting the result type for integer operations to the type of the left-hand-side operand. This means that thougha << b
anda.shl(b)
are one and the same from an evaluation standpoint, they are different when it comes to type inference. - The left shift assignment operator
<<=
. - The right shift operator
>>
. Note that because this trait is implemented for all integer types with multiple right-hand-side types, Rust’s type checker has special handling for_ >> _
, setting the result type for integer operations to the type of the left-hand-side operand. This means that thougha >> b
anda.shr(b)
are one and the same from an evaluation standpoint, they are different when it comes to type inference. - The right shift assignment operator
>>=
. - The subtraction operator
-
. - The subtraction assignment operator
-=
. - Trait to represent types that can be created by summing up an iterator.
- Simple and safe type conversions that may fail in a controlled way under some circumstances. It is the reciprocal of
TryInto
. - An attempted conversion that consumes
self
, which may or may not be expensive. E
formatting.X
formatting.
Derive Macros§
- What
#[derive(Add)]
generates - What
#[derive(AddAssign)]
generates - What
#[derive(AsRef)]
generates - What
#[derive(AsRef)]
generates - What
#[derive(Display)]
generates - What
#[derive(Add)]
generates - What
#[derive(AddAssign)]
generates - What
#[derive(Add)]
generates - What
#[derive(AddAssign)]
generates - What
#[derive(Add)]
generates - What
#[derive(AddAssign)]
generates - What
#[derive(Constructor)]
generates - What
#[derive(Debug)]
generates - Using
#[derive(Deref)]
- What
#[derive(DerefMut)]
generates - What
#[derive(Display)]
generates - What
#[derive(Mul)]
generates - What
#[derive(MulAssign)]
generates - Using
#[derive(Error)]
- What
#[derive(From)]
generates - What
#[derive(FromStr)]
generates - What
#[derive(Index)]
generates - What
#[derive(IndexMut)]
generates - What
#[derive(Into)]
generates - Using
#[derive(IntoIterator)]
- What
#[derive(IsVariant)]
generates - What
#[derive(Display)]
generates - What
#[derive(Display)]
generates - What
#[derive(Mul)]
generates - What
#[derive(MulAssign)]
generates - What
#[derive(Not)]
generates - What
#[derive(Not)]
generates - What
#[derive(Display)]
generates - What
#[derive(Display)]
generates - Using
#[derive(Sum)]
- What
#[derive(Mul)]
generates - What
#[derive(MulAssign)]
generates - What
#[derive(Mul)]
generates - What
#[derive(MulAssign)]
generates - What
#[derive(Mul)]
generates - What
#[derive(MulAssign)]
generates - What
#[derive(Add)]
generates - What
#[derive(AddAssign)]
generates - Using
#[derive(Sum)]
- What
#[derive(TryFrom)]
generates - What
#[derive(TryInto)]
generates - What
#[derive(TryUnwrap)]
generates - What
#[derive(Unwrap)]
generates - What
#[derive(Display)]
generates - What
#[derive(Display)]
generates