opencv/
lib.rs

1#![allow(rustdoc::broken_intra_doc_links)]
2// MSRV: remove this hint when edition is "2024" because it's included in it
3#![deny(unsafe_op_in_unsafe_fn)]
4//! Rust bindings for the OpenCV computer vision library
5//!
6//! [Git](https://github.com/twistedfall/opencv-rust) | [Readme](https://github.com/twistedfall/opencv-rust/blob/master/README.md) |
7//! [Docs](https://docs.rs/opencv) | [Sponsor](https://github.com/sponsors/twistedfall)
8//!
9//! Please note that this documentation is automatically generated from the C++ headers. So expect references to C++ items,
10//! code examples in C++ and other strange things.
11pub use error::{Error, Result};
12
13pub use crate::opencv::hub::*;
14
15#[macro_use]
16mod templ;
17
18pub mod error;
19mod manual;
20mod opencv;
21pub mod traits;
22
23pub mod prelude {
24	#[cfg(ocvrs_has_module_core)]
25	pub use crate::core::{DataType, Mat};
26	pub use crate::hub_prelude::*;
27	pub use crate::manual::prelude::*;
28	pub use crate::traits::Boxed;
29}
30
31/// Reexported platform types that are used by OpenCV
32pub mod platform_types {
33	pub use libc::{clock_t, ptrdiff_t, size_t, FILE};
34}
35
36/// Prelude for sys (externs) module and types
37pub mod mod_prelude_sys {
38	pub use std::ffi::{c_char, c_void};
39
40	pub use crate::platform_types::*;
41	pub use crate::traits::{Boxed, OpenCVFromExtern, OpenCVIntoExternContainer, OpenCVTypeExternContainer};
42}
43
44/// Prelude for generated modules and types
45pub mod mod_prelude {
46	pub use crate::boxed_ref::{BoxedRef, BoxedRefMut};
47	pub use crate::core::{ToInputArray, ToInputOutputArray, ToOutputArray};
48	pub use crate::hub_prelude::*;
49	pub use crate::mod_prelude_sys::*;
50	pub use crate::{
51		boxed_cast_base, boxed_cast_descendant, boxed_ref, extern_arg_send, extern_container_send, extern_receive, extern_send,
52		input_array_ref_forward, opencv_type_boxed, opencv_type_enum, opencv_type_simple, output_array_ref_forward, ptr_cast_base,
53		ptr_extern, ptr_extern_ctor, tuple_extern, vector_boxed_ref, vector_copy_non_bool, vector_extern, vector_non_copy_or_bool,
54		Result,
55	};
56}
57
58pub mod boxed_ref;
59mod cond_macros;