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§
- Add
- The addition operator
+. - AddAssign
- The addition assignment operator
+=. - AsMut
- Used to do a cheap mutable-to-mutable reference conversion.
- AsRef
- Used to do a cheap reference-to-reference conversion.
- Binary
bformatting.- BitAnd
- The bitwise AND operator
&. - BitAnd
Assign - The bitwise AND assignment operator
&=. - BitOr
- The bitwise OR operator
|. - BitOr
Assign - The bitwise OR assignment operator
|=. - BitXor
- The bitwise XOR operator
^. - BitXor
Assign - The bitwise XOR assignment operator
^=. - Debug
?formatting.- Deref
- Used for immutable dereferencing operations, like
*v. - Deref
Mut - Used for mutable dereferencing operations, like in
*v = 1;. - Display
- Format trait for an empty format,
{}. - Div
- The division operator
/. - DivAssign
- The division assignment operator
/=. - Error
Erroris a trait representing the basic expectations for error values, i.e., values of typeEinResult<T, E>.- From
- Used to do value-to-value conversions while consuming the input value. It is the reciprocal of
Into. - FromStr
- Parse a value from a string
- Index
- Used for indexing operations (
container[index]) in immutable contexts. - Index
Mut - Used for indexing operations (
container[index]) in mutable contexts. - Into
- A value-to-value conversion that consumes the input value. The
opposite of
From. - Into
Iterator - Conversion into an
Iterator. - Lower
Exp eformatting.- Lower
Hex xformatting.- Mul
- The multiplication operator
*. - MulAssign
- The multiplication assignment operator
*=. - Neg
- The unary negation operator
-. - Not
- The unary logical negation operator
!. - Octal
oformatting.- Pointer
pformatting.- Product
- Trait to represent types that can be created by multiplying elements of an iterator.
- Rem
- The remainder operator
%. - RemAssign
- The remainder assignment operator
%=. - Shl
- 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 << banda.shl(b)are one and the same from an evaluation standpoint, they are different when it comes to type inference. - ShlAssign
- The left shift assignment operator
<<=. - Shr
- 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 >> banda.shr(b)are one and the same from an evaluation standpoint, they are different when it comes to type inference. - ShrAssign
- The right shift assignment operator
>>=. - Sub
- The subtraction operator
-. - SubAssign
- The subtraction assignment operator
-=. - Sum
- Trait to represent types that can be created by summing up an iterator.
- TryFrom
- Simple and safe type conversions that may fail in a controlled
way under some circumstances. It is the reciprocal of
TryInto. - TryInto
- An attempted conversion that consumes
self, which may or may not be expensive. - Upper
Exp Eformatting.- Upper
Hex Xformatting.
Derive Macros§
- Add
- What
#[derive(Add)]generates - AddAssign
- What
#[derive(AddAssign)]generates - AsMut
- What
#[derive(AsRef)]generates - AsRef
- What
#[derive(AsRef)]generates - Binary
- What
#[derive(Display)]generates - BitAnd
- What
#[derive(Add)]generates - BitAnd
Assign - What
#[derive(AddAssign)]generates - BitOr
- What
#[derive(Add)]generates - BitOr
Assign - What
#[derive(AddAssign)]generates - BitXor
- What
#[derive(Add)]generates - BitXor
Assign - What
#[derive(AddAssign)]generates - Constructor
- What
#[derive(Constructor)]generates - Debug
- What
#[derive(Debug)]generates - Deref
- Using
#[derive(Deref)] - Deref
Mut - What
#[derive(DerefMut)]generates - Display
- What
#[derive(Display)]generates - Div
- What
#[derive(Mul)]generates - DivAssign
- What
#[derive(MulAssign)]generates - Error
- Using
#[derive(Error)] - From
- What
#[derive(From)]generates - FromStr
- What
#[derive(FromStr)]generates - Index
- What
#[derive(Index)]generates - Index
Mut - What
#[derive(IndexMut)]generates - Into
- What
#[derive(Into)]generates - Into
Iterator - Using
#[derive(IntoIterator)] - IsVariant
- What
#[derive(IsVariant)]generates - Lower
Exp - What
#[derive(Display)]generates - Lower
Hex - What
#[derive(Display)]generates - Mul
- What
#[derive(Mul)]generates - MulAssign
- What
#[derive(MulAssign)]generates - Neg
- What
#[derive(Not)]generates - Not
- What
#[derive(Not)]generates - Octal
- What
#[derive(Display)]generates - Pointer
- What
#[derive(Display)]generates - Product
- Using
#[derive(Sum)] - Rem
- What
#[derive(Mul)]generates - RemAssign
- What
#[derive(MulAssign)]generates - Shl
- What
#[derive(Mul)]generates - ShlAssign
- What
#[derive(MulAssign)]generates - Shr
- What
#[derive(Mul)]generates - ShrAssign
- What
#[derive(MulAssign)]generates - Sub
- What
#[derive(Add)]generates - SubAssign
- What
#[derive(AddAssign)]generates - Sum
- Using
#[derive(Sum)] - TryFrom
- What
#[derive(TryFrom)]generates - TryInto
- What
#[derive(TryInto)]generates - TryUnwrap
- What
#[derive(TryUnwrap)]generates - Unwrap
- What
#[derive(Unwrap)]generates - Upper
Exp - What
#[derive(Display)]generates - Upper
Hex - What
#[derive(Display)]generates