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
use Device;
use aravis_sys;
use glib::object::Cast;
use glib::translate::*;
use std::fmt;
glib_wrapper! {
pub struct UvDevice(Object<aravis_sys::ArvUvDevice, aravis_sys::ArvUvDeviceClass, UvDeviceClass>) @extends Device;
match fn {
get_type => || aravis_sys::arv_uv_device_get_type(),
}
}
impl UvDevice {
pub fn new(vendor: &str, product: &str, serial_nbr: &str) -> UvDevice {
assert_initialized_main_thread!();
unsafe {
Device::from_glib_full(aravis_sys::arv_uv_device_new(vendor.to_glib_none().0, product.to_glib_none().0, serial_nbr.to_glib_none().0)).unsafe_cast()
}
}
}
pub const NONE_UV_DEVICE: Option<&UvDevice> = None;
impl fmt::Display for UvDevice {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "UvDevice")
}
}