Trait lmdb_zero::traits::LmdbRawIfUnaligned
[−]
[src]
pub unsafe trait LmdbRawIfUnaligned: Copy + Sized { fn reported_type() -> String { ... } }
Marker trait for types where Unaligned<T>
is LmdbRaw
.
This has all the implications as LmdbRaw
, except that blanket
implementations around the bare type are not available. This forces the
client code to wrap the type in Unaligned
to explicitly handle possible
misalignment.
All integer and floating-point types have this trait.
Note that LmdbRawIfUnaligned
is not blanket-implemented for fixed-size
arrays, because currently doing so would preclude a blanket implementation
of LmdbRaw
for fixed-size arrays. Since the latter is generally more
useful and is more consistent since variable-length slices can only
usefully interact with LmdbRaw
, that approach was chosen.
All LmdbRaw
types are LmdbRawIfUnaligned
.
Provided Methods
fn reported_type() -> String
Returns the name of this type to report in error messages.
If not implemented, defaults to "?"
.
Implementations on Foreign Types
impl LmdbRawIfUnaligned for u16
[src]
fn reported_type() -> String
[src]
impl LmdbRawIfUnaligned for i16
[src]
fn reported_type() -> String
[src]
impl LmdbRawIfUnaligned for u32
[src]
fn reported_type() -> String
[src]
impl LmdbRawIfUnaligned for i32
[src]
fn reported_type() -> String
[src]
impl LmdbRawIfUnaligned for u64
[src]
fn reported_type() -> String
[src]
impl LmdbRawIfUnaligned for i64
[src]
fn reported_type() -> String
[src]
impl LmdbRawIfUnaligned for f32
[src]
fn reported_type() -> String
[src]
impl LmdbRawIfUnaligned for f64
[src]
fn reported_type() -> String
[src]
impl<V: LmdbRawIfUnaligned> LmdbRawIfUnaligned for Wrapping<V>
[src]
fn reported_type() -> String
[src]
Implementors
impl<T: LmdbRaw> LmdbRawIfUnaligned for T