zvariant

Trait Basic

Source
pub trait Basic: Type {
    const SIGNATURE_CHAR: char;
    const SIGNATURE_STR: &'static str;

    // Required method
    fn alignment(format: Format) -> usize;
}
Expand description

Trait for basic types.

All basic types are also Type implementers.

Required Associated Constants§

Source

const SIGNATURE_CHAR: char

The type signature, as a character.

Source

const SIGNATURE_STR: &'static str

The type signature, as a string.

Required Methods§

Source

fn alignment(format: Format) -> usize

The required padding alignment for the given format.

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

Source§

const SIGNATURE_CHAR: char = 'b'

Source§

const SIGNATURE_STR: &'static str = "b"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for char

Source§

const SIGNATURE_CHAR: char = 's'

Source§

const SIGNATURE_STR: &'static str = <&str>::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for f32

Source§

const SIGNATURE_CHAR: char = 'd'

Source§

const SIGNATURE_STR: &'static str = f64::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for f64

Source§

const SIGNATURE_CHAR: char = 'd'

Source§

const SIGNATURE_STR: &'static str = "d"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for i8

Source§

const SIGNATURE_CHAR: char = 'n'

Source§

const SIGNATURE_STR: &'static str = i16::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for i16

Source§

const SIGNATURE_CHAR: char = 'n'

Source§

const SIGNATURE_STR: &'static str = "n"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for i32

Source§

const SIGNATURE_CHAR: char = 'i'

Source§

const SIGNATURE_STR: &'static str = "i"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for i64

Source§

const SIGNATURE_CHAR: char = 'x'

Source§

const SIGNATURE_STR: &'static str = "x"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for str

Source§

const SIGNATURE_CHAR: char = 's'

Source§

const SIGNATURE_STR: &'static str = "s"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for u8

Source§

const SIGNATURE_CHAR: char = 'y'

Source§

const SIGNATURE_STR: &'static str = "y"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for u16

Source§

const SIGNATURE_CHAR: char = 'q'

Source§

const SIGNATURE_STR: &'static str = "q"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for u32

Source§

const SIGNATURE_CHAR: char = 'u'

Source§

const SIGNATURE_STR: &'static str = "u"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for u64

Source§

const SIGNATURE_CHAR: char = 't'

Source§

const SIGNATURE_STR: &'static str = "t"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for String

Source§

const SIGNATURE_CHAR: char = 's'

Source§

const SIGNATURE_STR: &'static str = "s"

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for NonZeroI8

Source§

const SIGNATURE_CHAR: char = 'n'

Source§

const SIGNATURE_STR: &'static str = i8::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for NonZeroI16

Source§

const SIGNATURE_CHAR: char = 'n'

Source§

const SIGNATURE_STR: &'static str = i16::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for NonZeroI32

Source§

const SIGNATURE_CHAR: char = 'i'

Source§

const SIGNATURE_STR: &'static str = i32::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for NonZeroI64

Source§

const SIGNATURE_CHAR: char = 'x'

Source§

const SIGNATURE_STR: &'static str = i64::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for NonZeroU8

Source§

const SIGNATURE_CHAR: char = 'y'

Source§

const SIGNATURE_STR: &'static str = u8::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for NonZeroU16

Source§

const SIGNATURE_CHAR: char = 'q'

Source§

const SIGNATURE_STR: &'static str = u16::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for NonZeroU32

Source§

const SIGNATURE_CHAR: char = 'u'

Source§

const SIGNATURE_STR: &'static str = u32::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl Basic for NonZeroU64

Source§

const SIGNATURE_CHAR: char = 't'

Source§

const SIGNATURE_STR: &'static str = u64::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Source§

impl<B> Basic for &B
where B: Basic + ?Sized,

Source§

const SIGNATURE_CHAR: char = B::SIGNATURE_CHAR

Source§

const SIGNATURE_STR: &'static str = B::SIGNATURE_STR

Source§

fn alignment(format: Format) -> usize

Implementors§

Source§

impl Basic for Fd<'_>

Source§

const SIGNATURE_CHAR: char = 'h'

Source§

const SIGNATURE_STR: &'static str = "h"

Source§

impl Basic for OwnedFd

Source§

const SIGNATURE_CHAR: char = 'h'

Source§

const SIGNATURE_STR: &'static str = "h"

Source§

impl Basic for OwnedObjectPath

Source§

const SIGNATURE_CHAR: char = 'o'

Source§

const SIGNATURE_STR: &'static str = ObjectPath::SIGNATURE_STR

Source§

impl Basic for OwnedSignature

Source§

const SIGNATURE_CHAR: char = 'g'

Source§

const SIGNATURE_STR: &'static str = Signature::SIGNATURE_STR

Source§

impl<'a> Basic for ObjectPath<'a>

Source§

const SIGNATURE_CHAR: char = 'o'

Source§

const SIGNATURE_STR: &'static str = "o"

Source§

impl<'a> Basic for Signature<'a>

Source§

const SIGNATURE_CHAR: char = 'g'

Source§

const SIGNATURE_STR: &'static str = "g"

Source§

impl<'a> Basic for Str<'a>

Source§

const SIGNATURE_CHAR: char = 's'

Source§

const SIGNATURE_STR: &'static str = <&str>::SIGNATURE_STR

impl Basic for BusName<'_>

impl Basic for ErrorName<'_>

impl Basic for InterfaceName<'_>

impl Basic for MemberName<'_>

impl Basic for PropertyName<'_>

impl Basic for UniqueName<'_>

impl Basic for WellKnownName<'_>