Struct gphoto::Port
[−]
[src]
pub struct Port<'a> { // some fields omitted }
A structure describing a port.
Example
A Port
object can be used to report information about a camera's connection:
let mut context = gphoto::Context::new().unwrap(); let mut camera = gphoto::Camera::autodetect(&mut context).unwrap(); let port = camera.port(); println!("port type = {:?}", port.port_type()); println!("port name = {:?}", port.name()); println!("port path = {:?}", port.path());
The above example may print something like the following:
port type = USB
port name = "Universal Serial Bus"
port path = "usb:020,007"