diff --git a/src/ast.rs b/src/ast.rs index c68555e9..0a69dd17 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -60,7 +60,7 @@ impl FnAccess { /// _(INTERNALS)_ A type containing information on a scripted function. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Clone)] @@ -273,8 +273,10 @@ impl AST { pub(crate) fn shared_lib(&self) -> Shared { self.functions.clone() } - /// Get the internal shared [`Module`] containing all script-defined functions. + /// _(INTERNALS)_ Get the internal shared [`Module`] containing all script-defined functions. + /// Exported under the `internals` feature only. #[cfg(feature = "internals")] + #[deprecated = "this method is volatile and may change"] #[cfg(not(feature = "no_module"))] #[cfg(not(feature = "no_function"))] #[inline(always)] @@ -764,7 +766,7 @@ impl AsRef for AST { /// _(INTERNALS)_ An identifier containing an [immutable string][ImmutableString] name and a [position][Position]. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Clone, Eq, PartialEq, Hash)] @@ -785,7 +787,7 @@ impl fmt::Debug for Ident { /// _(INTERNALS)_ A type encapsulating the mode of a `return`/`throw` statement. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)] @@ -799,7 +801,7 @@ pub enum ReturnType { /// _(INTERNALS)_ An [`AST`] node, consisting of either an [`Expr`] or a [`Stmt`]. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Clone, Hash)] @@ -823,7 +825,7 @@ impl<'a> From<&'a Expr> for ASTNode<'a> { /// _(INTERNALS)_ A statement. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Clone, Hash)] @@ -1070,7 +1072,7 @@ impl Stmt { /// _(INTERNALS)_ A custom syntax expression. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Clone, Hash)] @@ -1086,7 +1088,7 @@ pub struct CustomExpr { /// _(INTERNALS)_ A binary expression. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Clone, Hash)] @@ -1100,7 +1102,7 @@ pub struct BinaryExpr { /// _(INTERNALS)_ A function call. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Clone, Default, Hash)] @@ -1195,7 +1197,7 @@ impl FloatWrapper { /// _(INTERNALS)_ An expression sub-tree. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Clone, Hash)] diff --git a/src/engine.rs b/src/engine.rs index 77f0b8aa..c6dce576 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -45,7 +45,7 @@ pub const TYPICAL_MAP_SIZE: usize = 8; // Small maps are typical /// _(INTERNALS)_ A stack of imported [modules][Module]. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. // @@ -498,7 +498,7 @@ impl> From for Target<'_> { /// _(INTERNALS)_ A type that holds all the current states of the [`Engine`]. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Clone, Default)] @@ -538,7 +538,7 @@ impl State { /// _(INTERNALS)_ A type containing all the limits imposed by the [`Engine`]. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[cfg(not(feature = "unchecked"))] diff --git a/src/module/mod.rs b/src/module/mod.rs index 0d9046fe..c145e217 100644 --- a/src/module/mod.rs +++ b/src/module/mod.rs @@ -2004,7 +2004,7 @@ impl Module { /// A [`StaticVec`] is used because most namespace-qualified access contains only one level, /// and it is wasteful to always allocate a [`Vec`] with one element. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Clone, Eq, PartialEq, Default, Hash)] diff --git a/src/parse_error.rs b/src/parse_error.rs index e42c851a..a965af0b 100644 --- a/src/parse_error.rs +++ b/src/parse_error.rs @@ -11,7 +11,7 @@ use crate::{EvalAltResult, Position}; /// _(INTERNALS)_ Error encountered when tokenizing the script text. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Eq, PartialEq, Clone, Hash)] diff --git a/src/token.rs b/src/token.rs index 93eee9a2..89da190c 100644 --- a/src/token.rs +++ b/src/token.rs @@ -150,7 +150,7 @@ impl fmt::Debug for Position { /// _(INTERNALS)_ A Rhai language token. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, PartialEq, Clone)] @@ -742,7 +742,7 @@ impl From for String { /// _(INTERNALS)_ State of the tokenizer. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This type is volatile and may change. #[derive(Debug, Clone, Eq, PartialEq, Default)] @@ -764,7 +764,7 @@ pub struct TokenizeState { /// _(INTERNALS)_ Trait that encapsulates a peekable character input stream. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile Data Structure /// /// This trait is volatile and may change. pub trait InputStream { @@ -781,9 +781,9 @@ pub trait InputStream { /// _(INTERNALS)_ Parse a string literal wrapped by `enclosing_char`. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile API /// -/// This type is volatile and may change. +/// This function is volatile and may change. pub fn parse_string_literal( stream: &mut impl InputStream, state: &mut TokenizeState, @@ -976,9 +976,9 @@ fn scan_block_comment( /// _(INTERNALS)_ Get the next token from the `stream`. /// Exported under the `internals` feature only. /// -/// # WARNING +/// # Volatile API /// -/// This type is volatile and may change. +/// This function is volatile and may change. #[inline] pub fn get_next_token( stream: &mut impl InputStream,