forked from jerry73204/realsense-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstream_profile_kind.rs
39 lines (32 loc) · 978 Bytes
/
stream_profile_kind.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Marker traits and types for [StreamProfile](crate::stream_profile::StreamProfile).
use crate::{common::*, kind::Extension};
/// The marker traits of all kinds of StreamProfile.
pub trait StreamProfileKind {}
/// The marker traits of all kinds of StreamProfile except [Any](Any).
pub trait NonAnyStreamProfileKind
where
Self: StreamProfileKind,
{
const EXTENSION: Extension;
}
#[derive(Debug)]
pub struct Any;
impl StreamProfileKind for Any {}
#[derive(Debug)]
pub struct Video;
impl StreamProfileKind for Video {}
impl NonAnyStreamProfileKind for Video {
const EXTENSION: Extension = Extension::VideoProfile;
}
#[derive(Debug)]
pub struct Motion;
impl StreamProfileKind for Motion {}
impl NonAnyStreamProfileKind for Motion {
const EXTENSION: Extension = Extension::MotionProfile;
}
#[derive(Debug)]
pub struct Pose;
impl StreamProfileKind for Pose {}
impl NonAnyStreamProfileKind for Pose {
const EXTENSION: Extension = Extension::PoseProfile;
}