rune/module/
install_with.rs

1use core::cmp::Ordering;
2
3use crate::{ContextError, Hash};
4
5use super::Module;
6
7/// Trait to handle the installation of auxilliary functions for a type
8/// installed into a module.
9pub trait InstallWith {
10    /// Hook to install more things into the module.
11    fn install_with(_: &mut Module) -> Result<(), ContextError> {
12        Ok(())
13    }
14}
15
16impl InstallWith for i64 {}
17impl InstallWith for u64 {}
18impl InstallWith for f64 {}
19impl InstallWith for char {}
20impl InstallWith for bool {}
21impl InstallWith for Ordering {}
22impl InstallWith for Hash {}