Trait zvariant::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.

Object Safety§

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