zvariant

Trait Basic

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

    // Required method
    fn alignment(format: EncodingFormat) -> 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: EncodingFormat) -> 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§

impl Basic for char

source§

const SIGNATURE_CHAR: char = 's'

source§

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

source§

fn alignment(format: EncodingFormat) -> 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: EncodingFormat) -> usize

source§

impl Basic for f64

source§

impl Basic for i8

source§

const SIGNATURE_CHAR: char = 'n'

source§

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

source§

fn alignment(format: EncodingFormat) -> usize

source§

impl Basic for i16

source§

impl Basic for i32

source§

impl Basic for i64

source§

impl Basic for str

source§

impl Basic for u8

source§

impl Basic for u16

source§

impl Basic for u32

source§

impl Basic for u64

source§

impl Basic for String

source§

impl Basic for NonZeroI8

source§

const SIGNATURE_CHAR: char = 'n'

source§

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

source§

fn alignment(format: EncodingFormat) -> 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: EncodingFormat) -> 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: EncodingFormat) -> 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: EncodingFormat) -> 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: EncodingFormat) -> 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: EncodingFormat) -> 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: EncodingFormat) -> 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: EncodingFormat) -> 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: EncodingFormat) -> 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<'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