opencv-binding-generator 0.101.0

Binding generator for opencv crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::collections::HashMap;

use crate::writer::rust_native::type_ref::Lifetime;
use crate::SupportedModule;

pub type ClassTweaks = HashMap<&'static str, ClassTweak>;

#[derive(Clone, Copy, Debug)]
pub enum ClassTweak {
	Lifetime(Lifetime),
}

pub fn class_tweaks_factory(module: SupportedModule) -> ClassTweaks {
	match module {
		SupportedModule::Core => HashMap::from([("cv::MatSize", ClassTweak::Lifetime(Lifetime::Custom("mat")))]),
		_ => HashMap::default(),
	}
}