Struct gphoto::Camera
[−]
[src]
pub struct Camera {
// some fields omitted
}A structure representing a camera connected to the system.
Methods
impl Camera
fn autodetect(context: &mut Context) -> Result<Self>
Opens the first detected camera.
fn capture_image(&mut self, context: &mut Context) -> Result<CameraFile>
Captures an image.
fn download<T: Media>(&mut self, context: &mut Context, source: &CameraFile, destination: &mut T) -> Result<()>
Downloads a file from the camera.
fn port<'a>(&'a self) -> Port<'a>
Returns information about the port the camera is connected to.
fn abilities(&self) -> Abilities
Retrieves the camera's abilities.
fn storage(&mut self, context: &mut Context) -> Result<Vec<Storage>>
Retrieves information about the camera's storage.
Returns a Vec containing one Storage for each filesystem on the device.
fn summary(&mut self, context: &mut Context) -> Result<String>
Returns the camera's summary.
The summary typically contains non-configurable information about the camera, such as manufacturer and number of pictures taken.
Errors
This function returns an error if the summary could not be retrieved:
NotSupportedif there is no summary available for the camera.CorruptedDataif the summary is invalid UTF-8.
fn manual(&mut self, context: &mut Context) -> Result<String>
Returns the camera's manual.
The manual contains information about using the camera.
Errors
This function returns an error if the manual could not be retrieved:
NotSupportedif there is no manual available for the camera.CorruptedDataif the summary is invalid UTF-8.
fn about_driver(&mut self, context: &mut Context) -> Result<String>
Returns information about the camera driver.
This text typically contains information about the driver's author, acknowledgements, etc.
Errors
This function returns an error if the about text could not be retrieved:
NotSupportedif there is no about text available for the camera's driver.CorruptedDataif the summary is invalid UTF-8.