rename RhaiCustomType to CustomType
This commit is contained in:
parent
b6937fd21d
commit
1ccb5c0f26
@ -46,7 +46,7 @@ use crate::Engine;
|
|||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
pub trait RhaiCustomType {
|
pub trait CustomType {
|
||||||
/// Builds the custom type for use with the [`Engine`].
|
/// Builds the custom type for use with the [`Engine`].
|
||||||
/// i.e. register the type, getters, setters, methods, etc...
|
/// i.e. register the type, getters, setters, methods, etc...
|
||||||
fn build(engine: &mut Engine);
|
fn build(engine: &mut Engine);
|
||||||
@ -59,7 +59,7 @@ impl Engine {
|
|||||||
/// See [`RhaiCustomType`].
|
/// See [`RhaiCustomType`].
|
||||||
pub fn build_type<T>(&mut self) -> &mut Self
|
pub fn build_type<T>(&mut self) -> &mut Self
|
||||||
where
|
where
|
||||||
T: RhaiCustomType,
|
T: CustomType,
|
||||||
{
|
{
|
||||||
T::build(self);
|
T::build(self);
|
||||||
self
|
self
|
||||||
|
@ -166,7 +166,7 @@ type ExclusiveRange = std::ops::Range<INT>;
|
|||||||
/// An inclusive integer range.
|
/// An inclusive integer range.
|
||||||
type InclusiveRange = std::ops::RangeInclusive<INT>;
|
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 ast::{FnAccess, AST};
|
||||||
pub use engine::{Engine, OP_CONTAINS, OP_EQUALS};
|
pub use engine::{Engine, OP_CONTAINS, OP_EQUALS};
|
||||||
pub use eval::EvalContext;
|
pub use eval::EvalContext;
|
||||||
|
Loading…
Reference in New Issue
Block a user