#![doc = include_str!("../README.md")]
#![deny(unused_must_use)]
#![deny(missing_docs)] #![deny(clippy::as_conversions)]
pub mod abilities;
pub mod camera;
pub mod context;
pub mod error;
pub mod file;
pub mod filesys;
pub(crate) mod helper;
pub mod list;
pub mod port;
pub mod task;
pub(crate) mod thread;
pub mod widget;
use self::error::try_gp_internal;
#[doc(inline)]
pub use crate::{
camera::Camera,
context::Context,
error::{Error, Result},
};
pub use libgphoto2_sys;
#[cfg(all(test, not(feature = "test")))]
compile_error!("The test feature must be enabled to run the tests");
#[cfg(all(test, feature = "test"))]
fn sample_context() -> Context {
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
env_logger::builder()
.filter_module("gphoto2", log::LevelFilter::max())
.is_test(true)
.init();
libgphoto2_sys::test_utils::set_env();
});
Context::new().unwrap()
}