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§
const DESCRIPTOR: CuDepthEncodingDescriptor
const TYPE_PATH: &'static str
const SHORT_TYPE_PATH: &'static str
const TYPE_IDENT: &'static str
Required Associated Types§
type Sample: ElementType
Required Methods§
Sourcefn decode(sample: Self::Sample) -> Option<Length>
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.
Sourcefn encode_sample(sample: Option<Length>) -> Self::Sample
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".