[−][src]Module af_lib::prelude
A “prelude” module containing common imports.
Modules
af_core |
Macros
Debug | Derive macro generating an impl of the trait |
Eq | Derive macro generating an impl of the trait |
Hash | Derive macro generating an impl of the trait |
Ord | Derive macro generating an impl of the trait |
PartialEq | Derive macro generating an impl of the trait |
PartialOrd | Derive macro generating an impl of the trait |
attempt | Runs a block of code and catches |
attempt_async | Runs a block of async code and catches |
cfg_if | The main macro provided by this crate. See crate documentation for more information. |
debug | Logs a message at the debug level. |
error | Logs a message at the error level. |
fail | Returns an |
info | Logs a message at the info level. |
panic | Panics the current thread. |
pin | Pins a variable of type |
trace | Logs a message at the trace level. |
warn | Logs a message at the warn level. |
Structs
Arc | A thread-safe reference-counting pointer. 'Arc' stands for 'Atomically Reference Counted'. |
ArcWeak |
|
Cell | A mutable memory location. |
Date | |
Duration | A duration of time. |
Lazy | A value which is initialized on the first access. |
ManuallyDrop | A wrapper to inhibit compiler from automatically calling |
Panic | An error representing a panic. |
PhantomData | Zero-sized type used to mark things that "act like" they own a |
Pin | A pinned pointer. |
Range | A (half-open) range bounded inclusively below and exclusively above
( |
RangeFrom | A range only bounded inclusively below ( |
RangeFull | An unbounded range ( |
RangeInclusive | A range bounded inclusively below and above ( |
RangeTo | A range only bounded exclusively above ( |
RangeToInclusive | A range only bounded inclusively above ( |
Rc | A single-threaded reference-counting pointer. 'Rc' stands for 'Reference Counted'. |
RcWeak |
|
RefCell | A mutable memory location with dynamically checked borrow rules |
Time | A timestamp with a time zone. |
Uuid | A universally-unique identifier. |
Enums
ControlFlow | Experimental Used to make try_fold closures more like normal loops |
GeneratorState | Experimental The result of a generator resumption. |
Bound | An endpoint of a range of keys. |
Cow | A clone-on-write smart pointer. |
Infallible | The error type for errors that can never happen. |
Traits
CoerceUnsized | Experimental Trait that indicates that this is a pointer or a wrapper for one, where unsizing can be performed on the pointee. |
DispatchFromDyn | Experimental This is used for object safety, to check that a method's receiver type can be dispatched on. |
Generator | Experimental The trait implemented by builtin generator types. |
Try | Experimental A trait for customizing the behavior of the |
Add | The addition operator |
AddAssign | The addition assignment operator |
Any | A trait to emulate dynamic typing. |
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 |
Borrow | A trait for borrowing data. |
BorrowMut | A trait for mutably borrowing data. |
Debug |
|
Deref | Used for immutable dereferencing operations, like |
DerefMut | Used for mutable dereferencing operations, like in |
Deserialize | A data structure that can be deserialized from any data format supported by Serde. |
Deserializer | A data format that can deserialize any data structure supported by Serde. |
Display | Format trait for an empty format, |
Div | The division operator |
DivAssign | The division assignment operator |
Drop | Custom code within the destructor. |
Eq | Trait for equality comparisons which are equivalence relations. |
Error |
|
Fn | The version of the call operator that takes an immutable receiver. |
FnMut | The version of the call operator that takes a mutable receiver. |
FnOnce | The version of the call operator that takes a by-value receiver. |
FromStr | Parse a value from a string |
Future | A future represents an asynchronous computation. |
Hash | A hashable type. |
Hasher | A trait for hashing an arbitrary stream of bytes. |
Index | Used for indexing operations ( |
IndexMut | Used for indexing operations ( |
Mul | The multiplication operator |
MulAssign | The multiplication assignment operator |
Neg | The unary negation operator |
Not | The unary logical negation operator |
Number | A trait for types that implement all the basic operations of a number. |
Ord | Trait for types that form a total order. |
PartialEq | Trait for equality comparisons which are partial equivalence relations. |
PartialOrd | Trait for values that can be compared for a sort-order. |
Random | A trait for types that can be created randomly. |
RangeBounds |
|
Rem | The remainder operator |
RemAssign | The remainder assignment operator |
Serialize | A data structure that can be serialized into any data format supported by Serde. |
Serializer | A data format that can serialize any data structure supported by Serde. |
Shl | The left shift operator |
ShlAssign | The left shift assignment operator |
Shr | The right shift operator |
ShrAssign | The right shift assignment operator |
Stream | A stream of values produced asynchronously. |
StreamExt | Extension trait for |
Sub | The subtraction operator |
SubAssign | The subtraction assignment operator |
ToOwned | A generalization of |
TryFrom | Simple and safe type conversions that may fail in a controlled
way under some circumstances. It is the reciprocal of |
TryFuture | A |
TryInto | An attempted conversion that consumes |
_ | A trait for writing or formatting into Unicode-accepting buffers or streams. |
_ | Extension methods for futures that return a result. |
_ | An |
_ | An extension trait for |
_ | A |
_ | The |
_ | The |
_ | A trait for objects which are byte-oriented sinks. |
Functions
default | Returns the “default value” for a type. |
random | Generates a random value. |
Type Definitions
Result | Represents either success ( |
Attribute Macros
pin_project | An attribute that creates projection types covering all the fields of struct or enum. |
Derive Macros
Deserialize | |
Error | |
Serialize |