Module with_trait

Source
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
b formatting.
BitAnd
The bitwise AND operator &.
BitAndAssign
The bitwise AND assignment operator &=.
BitOr
The bitwise OR operator |.
BitOrAssign
The bitwise OR assignment operator |=.
BitXor
The bitwise XOR operator ^.
BitXorAssign
The bitwise XOR assignment operator ^=.
Debug
? formatting.
Deref
Used for immutable dereferencing operations, like *v.
DerefMut
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
Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<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.
IndexMut
Used for indexing operations (container[index]) in mutable contexts.
Into
A value-to-value conversion that consumes the input value. The opposite of From.
IntoIterator
Conversion into an Iterator.
LowerExp
e formatting.
LowerHex
x formatting.
Mul
The multiplication operator *.
MulAssign
The multiplication assignment operator *=.
Neg
The unary negation operator -.
Not
The unary logical negation operator !.
Octal
o formatting.
Pointer
p formatting.
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 though a << b and a.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 though a >> b and a.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.
UpperExp
E formatting.
UpperHex
X formatting.

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
BitAndAssign
What #[derive(AddAssign)] generates
BitOr
What #[derive(Add)] generates
BitOrAssign
What #[derive(AddAssign)] generates
BitXor
What #[derive(Add)] generates
BitXorAssign
What #[derive(AddAssign)] generates
Constructor
What #[derive(Constructor)] generates
Debug
What #[derive(Debug)] generates
Deref
Using #[derive(Deref)]
DerefMut
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
IndexMut
What #[derive(IndexMut)] generates
Into
What #[derive(Into)] generates
IntoIterator
Using #[derive(IntoIterator)]
IsVariant
What #[derive(IsVariant)] generates
LowerExp
What #[derive(Display)] generates
LowerHex
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
UpperExp
What #[derive(Display)] generates
UpperHex
What #[derive(Display)] generates