trouble-host

Crates

git

Versions

default

Flavors

Skip to main content

AsGatt

Trait AsGatt 

Source
pub trait AsGatt {
    const MIN_SIZE: usize;
    const MAX_SIZE: usize;

    // Required method
    fn as_gatt(&self) -> &[u8];
}
Expand description

Trait to allow conversion of a type to gatt bytes

Required Associated Constants§

Source

const MIN_SIZE: usize

The minimum size the type might be

Source

const MAX_SIZE: usize

The maximum size the type might be

Required Methods§

Source

fn as_gatt(&self) -> &[u8]

Converts to gatt bytes. Must return a slice of len in MIN_SIZE..=MAX_SIZE

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl AsGatt for ()

Source§

const MIN_SIZE: usize = Self::SIZE

Source§

const MAX_SIZE: usize = Self::SIZE

Source§

fn as_gatt(&self) -> &[u8]

Source§

impl AsGatt for [u8]

Source§

const MIN_SIZE: usize = 0

Source§

const MAX_SIZE: usize = usize::MAX

Source§

fn as_gatt(&self) -> &[u8]

Source§

impl AsGatt for bool

Source§

const MIN_SIZE: usize = Self::SIZE

Source§

const MAX_SIZE: usize = Self::SIZE

Source§

fn as_gatt(&self) -> &[u8]

Source§

impl AsGatt for f32

Source§

impl AsGatt for f64

Source§

impl AsGatt for i8

Source§

impl AsGatt for i16

Source§

impl AsGatt for i32

Source§

impl AsGatt for i64

Source§

impl AsGatt for i128

Source§

impl AsGatt for str

Source§

const MIN_SIZE: usize = 0

Source§

const MAX_SIZE: usize = usize::MAX

Source§

fn as_gatt(&self) -> &[u8]

Source§

impl AsGatt for u8

Source§

impl AsGatt for u16

Source§

impl AsGatt for u32

Source§

impl AsGatt for u64

Source§

impl AsGatt for u128

Source§

impl<T: AsGatt + ?Sized> AsGatt for &T

Source§

const MIN_SIZE: usize = T::MIN_SIZE

Source§

const MAX_SIZE: usize = T::MAX_SIZE

Source§

fn as_gatt(&self) -> &[u8]

Source§

impl<const N: usize> AsGatt for Vec<u8, N>

Source§

const MIN_SIZE: usize = 0

Source§

const MAX_SIZE: usize = N

Source§

fn as_gatt(&self) -> &[u8]

Source§

impl<const N: usize> AsGatt for [u8; N]

Source§

const MIN_SIZE: usize = 0

Source§

const MAX_SIZE: usize = N

Source§

fn as_gatt(&self) -> &[u8]

Implementors§