Value

Trait Value 

Source
pub unsafe trait Value: Send + 'static {
    type Item: Field;

    // Required methods
    fn len(&self) -> usize;
    fn check_len(count: usize) -> bool;
    fn cast_ptr(ptr: *const u8, len: usize) -> *const Self;
}
Expand description

Value of the channel.

Consists of single or many items.

§Safety

Should be implemented only for types that represented in memory as Self::Item.

Required Associated Types§

Source

type Item: Field

Type of the item.

Required Methods§

Source

fn len(&self) -> usize

Length of the value.

Source

fn check_len(count: usize) -> bool

Check that provided length allowed for Self.

Source

fn cast_ptr(ptr: *const u8, len: usize) -> *const Self

Create pointer (possibly wide) to value from raw pointer.

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<T: Field> Value for [T]

Implementors§

Source§

impl<T: Field> Value for T

Source§

type Item = T