pub trait Basic: Type {
const SIGNATURE_CHAR: char;
const SIGNATURE_STR: &'static str;
// Provided method
fn alignment(format: Format) -> usize { ... }
}Expand description
Trait for basic types.
All basic types are also Type implementers.
Required Associated Constants§
Sourceconst SIGNATURE_CHAR: char
const SIGNATURE_CHAR: char
The type signature, as a character.
Sourceconst SIGNATURE_STR: &'static str
const SIGNATURE_STR: &'static str
The type signature, as a string.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Basic for bool
impl Basic for bool
const SIGNATURE_CHAR: char = 'b'
const SIGNATURE_STR: &'static str = "b"
Source§impl Basic for char
impl Basic for char
const SIGNATURE_CHAR: char = 's'
const SIGNATURE_STR: &'static str = <&str>::SIGNATURE_STR
Source§impl Basic for f32
impl Basic for f32
const SIGNATURE_CHAR: char = 'd'
const SIGNATURE_STR: &'static str = f64::SIGNATURE_STR
Source§impl Basic for f64
impl Basic for f64
const SIGNATURE_CHAR: char = 'd'
const SIGNATURE_STR: &'static str = "d"
Source§impl Basic for i8
impl Basic for i8
const SIGNATURE_CHAR: char = 'n'
const SIGNATURE_STR: &'static str = i16::SIGNATURE_STR
Source§impl Basic for i16
impl Basic for i16
const SIGNATURE_CHAR: char = 'n'
const SIGNATURE_STR: &'static str = "n"
Source§impl Basic for i32
impl Basic for i32
const SIGNATURE_CHAR: char = 'i'
const SIGNATURE_STR: &'static str = "i"
Source§impl Basic for i64
impl Basic for i64
const SIGNATURE_CHAR: char = 'x'
const SIGNATURE_STR: &'static str = "x"
Source§impl Basic for isize
impl Basic for isize
const SIGNATURE_CHAR: char = 'x'
const SIGNATURE_STR: &'static str = <i64 as Basic>::SIGNATURE_STR
Source§impl Basic for str
impl Basic for str
const SIGNATURE_CHAR: char = 's'
const SIGNATURE_STR: &'static str = "s"
Source§impl Basic for u8
impl Basic for u8
const SIGNATURE_CHAR: char = 'y'
const SIGNATURE_STR: &'static str = "y"
Source§impl Basic for u16
impl Basic for u16
const SIGNATURE_CHAR: char = 'q'
const SIGNATURE_STR: &'static str = "q"
Source§impl Basic for u32
impl Basic for u32
const SIGNATURE_CHAR: char = 'u'
const SIGNATURE_STR: &'static str = "u"
Source§impl Basic for u64
impl Basic for u64
const SIGNATURE_CHAR: char = 't'
const SIGNATURE_STR: &'static str = "t"
Source§impl Basic for usize
impl Basic for usize
const SIGNATURE_CHAR: char = 't'
const SIGNATURE_STR: &'static str = <u64 as Basic>::SIGNATURE_STR
Source§impl Basic for String
impl Basic for String
const SIGNATURE_CHAR: char = 's'
const SIGNATURE_STR: &'static str = "s"
Source§impl Basic for AtomicBool
Available on target_has_atomic=8 only.
impl Basic for AtomicBool
Available on
target_has_atomic=8 only.const SIGNATURE_CHAR: char = 'b'
const SIGNATURE_STR: &'static str = <bool as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicI8
Available on target_has_atomic=8 only.
impl Basic for AtomicI8
Available on
target_has_atomic=8 only.const SIGNATURE_CHAR: char = 'n'
const SIGNATURE_STR: &'static str = <i8 as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicI16
Available on target_has_atomic=16 only.
impl Basic for AtomicI16
Available on
target_has_atomic=16 only.const SIGNATURE_CHAR: char = 'n'
const SIGNATURE_STR: &'static str = <i16 as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicI32
Available on target_has_atomic=32 only.
impl Basic for AtomicI32
Available on
target_has_atomic=32 only.const SIGNATURE_CHAR: char = 'i'
const SIGNATURE_STR: &'static str = <i32 as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicI64
Available on target_has_atomic=64 only.
impl Basic for AtomicI64
Available on
target_has_atomic=64 only.const SIGNATURE_CHAR: char = 'x'
const SIGNATURE_STR: &'static str = <i64 as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicIsize
Available on target_has_atomic=ptr only.
impl Basic for AtomicIsize
Available on
target_has_atomic=ptr only.const SIGNATURE_CHAR: char = 'x'
const SIGNATURE_STR: &'static str = <isize as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicU8
Available on target_has_atomic=8 only.
impl Basic for AtomicU8
Available on
target_has_atomic=8 only.const SIGNATURE_CHAR: char = 'y'
const SIGNATURE_STR: &'static str = <u8 as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicU16
Available on target_has_atomic=16 only.
impl Basic for AtomicU16
Available on
target_has_atomic=16 only.const SIGNATURE_CHAR: char = 'q'
const SIGNATURE_STR: &'static str = <u16 as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicU32
Available on target_has_atomic=32 only.
impl Basic for AtomicU32
Available on
target_has_atomic=32 only.const SIGNATURE_CHAR: char = 'u'
const SIGNATURE_STR: &'static str = <u32 as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicU64
Available on target_has_atomic=64 only.
impl Basic for AtomicU64
Available on
target_has_atomic=64 only.const SIGNATURE_CHAR: char = 't'
const SIGNATURE_STR: &'static str = <u64 as Basic>::SIGNATURE_STR
Source§impl Basic for AtomicUsize
Available on target_has_atomic=ptr only.
impl Basic for AtomicUsize
Available on
target_has_atomic=ptr only.