Docs.rs
enum-conversion-traits-0.0.1
enum-conversion-traits 0.0.1
Permalink
Docs.rs crate page
GPL-2.0-or-later
Links
Homepage
Repository
crates.io
Source
Owners
batconjurer
Dependencies
Versions
33.33%
of the crate is documented
Platform
i686-pc-windows-msvc
i686-unknown-linux-gnu
x86_64-apple-darwin
x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
enum_
conversion_
traits
0.0.1
All Items
Crate Items
Structs
Traits
Crate
enum_conversion_traits
Copy item path
Source
Structs
§
Enum
Conversion
Error
Custom errors for this crate. Keeps a record of the enum and requested type that produced the error
Traits
§
GetVariant
This is a helper trait for implementing the
TryTo
and
std::convert::TryFrom
traits on enums. Is uses marker structs to uniquely identify a type in the enum. This avoids relying on
std::any::TypeId
which is limited to types that are
'static
.
TryTo
Not all enums can have the
std::convert::TryFrom
trait derived on them because of rules around implementing foreign traits on foreign types.