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"

Methods

impl<'a> Port<'a>

fn port_type(&self) -> PortType

Returns the type of the port.

fn name(&self) -> Cow<str>

Returns the name of the port.

fn path(&self) -> Cow<str>

Returns the path of the port.