Skip to main content

CuDepthEncoding

Trait CuDepthEncoding 

Source
pub trait CuDepthEncoding:
    Copy
    + Debug
    + Default
    + Send
    + Sync
    + 'static {
    type Sample: ElementType;

    const DESCRIPTOR: CuDepthEncodingDescriptor;
    const TYPE_PATH: &'static str;
    const SHORT_TYPE_PATH: &'static str;
    const TYPE_IDENT: &'static str;

    // Required methods
    fn decode(sample: Self::Sample) -> Option<Length>;
    fn encode_sample(sample: Option<Length>) -> Self::Sample;
}
Expand description

Compile-time description of a depth map’s native sample representation.

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

fn decode(sample: Self::Sample) -> Option<Length>

Converts one native sample into a typed physical length.

Returns None when the raw sample represents an invalid measurement.

Source

fn encode_sample(sample: Option<Length>) -> Self::Sample

Converts a typed physical length into one native sample.

None represents an invalid measurement in the target encoding.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl CuDepthEncoding for CuDepthLength

Source§

const DESCRIPTOR: CuDepthEncodingDescriptor

Source§

const TYPE_PATH: &'static str = "cu_sensor_payloads::CuDepthMap"

Source§

const SHORT_TYPE_PATH: &'static str = "CuDepthMap"

Source§

const TYPE_IDENT: &'static str = "CuDepthMap"

Source§

type Sample = Length

Source§

impl<T, S> CuDepthEncoding for CuDepthInteger<T, S>

Source§

const DESCRIPTOR: CuDepthEncodingDescriptor

Source§

const TYPE_PATH: &'static str = "cu_sensor_payloads::CuDepthMapInteger"

Source§

const SHORT_TYPE_PATH: &'static str = "CuDepthMapInteger"

Source§

const TYPE_IDENT: &'static str = "CuDepthMapInteger"

Source§

type Sample = T