rename RhaiCustomType to CustomType

This commit is contained in:
Tristan Guichaoua 2022-08-08 15:12:43 +02:00
parent b6937fd21d
commit 1ccb5c0f26
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ use crate::Engine;
/// # Ok(())
/// # }
/// ```
pub trait RhaiCustomType {
pub trait CustomType {
/// Builds the custom type for use with the [`Engine`].
/// i.e. register the type, getters, setters, methods, etc...
fn build(engine: &mut Engine);
@ -59,7 +59,7 @@ impl Engine {
/// See [`RhaiCustomType`].
pub fn build_type<T>(&mut self) -> &mut Self
where
T: RhaiCustomType,
T: CustomType,
{
T::build(self);
self

View File

@ -166,7 +166,7 @@ type ExclusiveRange = std::ops::Range<INT>;
/// An inclusive integer range.
type InclusiveRange = std::ops::RangeInclusive<INT>;
pub use api::{build_type::RhaiCustomType, events::VarDefInfo};
pub use api::{build_type::CustomType, events::VarDefInfo};
pub use ast::{FnAccess, AST};
pub use engine::{Engine, OP_CONTAINS, OP_EQUALS};
pub use eval::EvalContext;