Skip to main content

Target

Trait Target 

pub trait Target: Obj {
    const PTR_SIZE: Size;
    const PTR_ALIGN: Align;
    const INT_MAX_ALIGN: Align;
    const ENDIANNESS: Endianness;
    const MAX_ATOMIC_SIZE: Size;

    // Required method
    fn valid_size(size: Size) -> bool;
}

Required Associated Constants§

const PTR_SIZE: Size

The size and align of a pointer.

const PTR_ALIGN: Align

const INT_MAX_ALIGN: Align

The maximum alignment of integer types. Smaller types are aligned to their size.

const ENDIANNESS: Endianness

The endianess used for encoding multi-byte integer values (and pointers).

const MAX_ATOMIC_SIZE: Size

Maximum size of an atomic operation.

Required Methods§

fn valid_size(size: Size) -> bool

Checks that size is not too large for this target.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§