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 = <&str>::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = <&str>::SIGNATURE_STR
Source§impl Basic for f32
impl Basic for f32
const SIGNATURE_CHAR: char = f64::SIGNATURE_CHAR
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 = i16::SIGNATURE_CHAR
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 = <i64 as Basic>::SIGNATURE_CHAR
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 = <u64 as Basic>::SIGNATURE_CHAR
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 = <bool as Basic>::SIGNATURE_CHAR
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 = <i8 as Basic>::SIGNATURE_CHAR
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 = <i16 as Basic>::SIGNATURE_CHAR
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 = <i32 as Basic>::SIGNATURE_CHAR
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 = <i64 as Basic>::SIGNATURE_CHAR
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 = <isize as Basic>::SIGNATURE_CHAR
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 = <u8 as Basic>::SIGNATURE_CHAR
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 = <u16 as Basic>::SIGNATURE_CHAR
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 = <u32 as Basic>::SIGNATURE_CHAR
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 = <u64 as Basic>::SIGNATURE_CHAR
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.const SIGNATURE_CHAR: char = <usize as Basic>::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = <usize as Basic>::SIGNATURE_STR
Source§impl Basic for NonZeroI8
impl Basic for NonZeroI8
const SIGNATURE_CHAR: char = i8::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = i8::SIGNATURE_STR
Source§impl Basic for NonZeroI16
impl Basic for NonZeroI16
const SIGNATURE_CHAR: char = i16::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = i16::SIGNATURE_STR
Source§impl Basic for NonZeroI32
impl Basic for NonZeroI32
const SIGNATURE_CHAR: char = i32::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = i32::SIGNATURE_STR
Source§impl Basic for NonZeroI64
impl Basic for NonZeroI64
const SIGNATURE_CHAR: char = i64::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = i64::SIGNATURE_STR
Source§impl Basic for NonZeroU8
impl Basic for NonZeroU8
const SIGNATURE_CHAR: char = u8::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = u8::SIGNATURE_STR
Source§impl Basic for NonZeroU16
impl Basic for NonZeroU16
const SIGNATURE_CHAR: char = u16::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = u16::SIGNATURE_STR
Source§impl Basic for NonZeroU32
impl Basic for NonZeroU32
const SIGNATURE_CHAR: char = u32::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = u32::SIGNATURE_STR
Source§impl Basic for NonZeroU64
impl Basic for NonZeroU64
const SIGNATURE_CHAR: char = u64::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = u64::SIGNATURE_STR
Source§impl<T: Basic> Basic for Reverse<T>
impl<T: Basic> Basic for Reverse<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: Basic> Basic for Saturating<T>
impl<T: Basic> Basic for Saturating<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: Basic> Basic for Wrapping<T>
impl<T: Basic> Basic for Wrapping<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic + ToOwned> Basic for Cow<'_, T>
impl<T: ?Sized + Basic + ToOwned> Basic for Cow<'_, T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for &T
impl<T: ?Sized + Basic> Basic for &T
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for &mut T
impl<T: ?Sized + Basic> Basic for &mut T
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for Box<T>
impl<T: ?Sized + Basic> Basic for Box<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for Rc<T>
impl<T: ?Sized + Basic> Basic for Rc<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for Weak<T>
impl<T: ?Sized + Basic> Basic for Weak<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for Arc<T>
impl<T: ?Sized + Basic> Basic for Arc<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for Weak<T>
impl<T: ?Sized + Basic> Basic for Weak<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for Cell<T>
impl<T: ?Sized + Basic> Basic for Cell<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for RefCell<T>
impl<T: ?Sized + Basic> Basic for RefCell<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for Mutex<T>
impl<T: ?Sized + Basic> Basic for Mutex<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<T: ?Sized + Basic> Basic for RwLock<T>
impl<T: ?Sized + Basic> Basic for RwLock<T>
const SIGNATURE_CHAR: char = T::SIGNATURE_CHAR
const SIGNATURE_STR: &'static str = T::SIGNATURE_STR
Source§impl<const CAP: usize> Basic for String<CAP>
Available on crate feature heapless only.
impl<const CAP: usize> Basic for String<CAP>
Available on crate feature
heapless only.