Doc formatting.
This commit is contained in:
parent
fbfb7677c1
commit
1e13e6be5f
@ -60,7 +60,7 @@ pub type Array = Vec<Dynamic>;
|
|||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
pub type Map = HashMap<ImmutableString, Dynamic>;
|
pub type Map = HashMap<ImmutableString, Dynamic>;
|
||||||
|
|
||||||
/// [INTERNALS] A stack of imported modules.
|
/// _[INTERNALS]_ A stack of imported modules.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
@ -289,7 +289,7 @@ impl<T: Into<Dynamic>> From<T> for Target<'_> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] A type that holds all the current states of the Engine.
|
/// _[INTERNALS]_ A type that holds all the current states of the Engine.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
@ -318,7 +318,7 @@ impl State {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] A type containing all the limits imposed by the `Engine`.
|
/// _[INTERNALS]_ A type containing all the limits imposed by the `Engine`.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
|
@ -10,7 +10,7 @@ use crate::stdlib::{
|
|||||||
string::{String, ToString},
|
string::{String, ToString},
|
||||||
};
|
};
|
||||||
|
|
||||||
/// [INTERNALS] Error encountered when tokenizing the script text.
|
/// _[INTERNALS]_ Error encountered when tokenizing the script text.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
|
10
src/lib.rs
10
src/lib.rs
@ -128,16 +128,14 @@ pub mod module_resolvers {
|
|||||||
pub use crate::module::resolvers::*;
|
pub use crate::module::resolvers::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Serialization support for [`serde`](https://crates.io/crates/serde).
|
/// _[SERDE]_ Serialization support for [`serde`](https://crates.io/crates/serde).
|
||||||
///
|
/// Exported under the `serde` feature.
|
||||||
/// Requires the `serde` feature.
|
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
pub mod ser {
|
pub mod ser {
|
||||||
pub use crate::serde::ser::to_dynamic;
|
pub use crate::serde::ser::to_dynamic;
|
||||||
}
|
}
|
||||||
/// Deserialization support for [`serde`](https://crates.io/crates/serde).
|
/// _[SERDE]_ Deserialization support for [`serde`](https://crates.io/crates/serde).
|
||||||
///
|
/// Exported under the `serde` feature.
|
||||||
/// Requires the `serde` feature.
|
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
pub mod de {
|
pub mod de {
|
||||||
pub use crate::serde::de::from_dynamic;
|
pub use crate::serde::de::from_dynamic;
|
||||||
|
@ -1457,7 +1457,7 @@ impl Module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] A chain of module names to qualify a variable or function call.
|
/// _[INTERNALS]_ A chain of module names to qualify a variable or function call.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// A `u64` hash key is cached for quick search purposes.
|
/// A `u64` hash key is cached for quick search purposes.
|
||||||
|
@ -91,7 +91,8 @@ impl AST {
|
|||||||
&self.0
|
&self.0
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] Get the statements.
|
/// _[INTERNALS]_ Get the statements.
|
||||||
|
/// Exported under the `internals` feature only.
|
||||||
#[cfg(feature = "internals")]
|
#[cfg(feature = "internals")]
|
||||||
#[deprecated(note = "this method is volatile and may change")]
|
#[deprecated(note = "this method is volatile and may change")]
|
||||||
pub fn statements(&self) -> &[Stmt] {
|
pub fn statements(&self) -> &[Stmt] {
|
||||||
@ -109,7 +110,8 @@ impl AST {
|
|||||||
&self.1
|
&self.1
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] Get the internal `Module` containing all script-defined functions.
|
/// _[INTERNALS]_ Get the internal `Module` containing all script-defined functions.
|
||||||
|
/// Exported under the `internals` feature only.
|
||||||
#[cfg(feature = "internals")]
|
#[cfg(feature = "internals")]
|
||||||
#[deprecated(note = "this method is volatile and may change")]
|
#[deprecated(note = "this method is volatile and may change")]
|
||||||
pub fn lib(&self) -> &Module {
|
pub fn lib(&self) -> &Module {
|
||||||
@ -374,7 +376,7 @@ impl FnAccess {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] A type containing information on a scripted function.
|
/// _[INTERNALS]_ A type containing information on a scripted function.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
@ -416,7 +418,7 @@ impl fmt::Display for ScriptFnDef {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] A type encapsulating the mode of a `return`/`throw` statement.
|
/// _[INTERNALS]_ A type encapsulating the mode of a `return`/`throw` statement.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
@ -561,7 +563,7 @@ impl ParseSettings {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] A Rhai statement.
|
/// _[INTERNALS]_ A Rhai statement.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// Each variant is at most one pointer in size (for speed),
|
/// Each variant is at most one pointer in size (for speed),
|
||||||
@ -721,7 +723,7 @@ impl Stmt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] A type wrapping a custom syntax definition.
|
/// _[INTERNALS]_ A type wrapping a custom syntax definition.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
@ -742,7 +744,7 @@ impl Hash for CustomExpr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] A type wrapping a floating-point number.
|
/// _[INTERNALS]_ A type wrapping a floating-point number.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// This type is mainly used to provide a standard `Hash` implementation
|
/// This type is mainly used to provide a standard `Hash` implementation
|
||||||
@ -763,7 +765,7 @@ impl Hash for FloatWrapper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] An expression sub-tree.
|
/// _[INTERNALS]_ An expression sub-tree.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// Each variant is at most one pointer in size (for speed),
|
/// Each variant is at most one pointer in size (for speed),
|
||||||
|
10
src/token.rs
10
src/token.rs
@ -147,7 +147,7 @@ impl fmt::Debug for Position {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] A Rhai language token.
|
/// _[INTERNALS]_ A Rhai language token.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
@ -709,7 +709,7 @@ impl From<Token> for String {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] State of the tokenizer.
|
/// _[INTERNALS]_ State of the tokenizer.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
@ -729,7 +729,7 @@ pub struct TokenizeState {
|
|||||||
pub include_comments: bool,
|
pub include_comments: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] Trait that encapsulates a peekable character input stream.
|
/// _[INTERNALS]_ Trait that encapsulates a peekable character input stream.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
@ -743,7 +743,7 @@ pub trait InputStream {
|
|||||||
fn peek_next(&mut self) -> Option<char>;
|
fn peek_next(&mut self) -> Option<char>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] Parse a string literal wrapped by `enclosing_char`.
|
/// _[INTERNALS]_ Parse a string literal wrapped by `enclosing_char`.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
@ -931,7 +931,7 @@ fn scan_comment(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] Get the next token from the `InputStream`.
|
/// _[INTERNALS]_ Get the next token from the `InputStream`.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// ## WARNING
|
/// ## WARNING
|
||||||
|
@ -61,7 +61,7 @@ impl BuildHasher for StraightHasherBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] Calculate a `u64` hash key from a module-qualified function name and parameter types.
|
/// _[INTERNALS]_ Calculate a `u64` hash key from a module-qualified function name and parameter types.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
///
|
///
|
||||||
/// Module names are passed in via `&str` references from an iterator.
|
/// Module names are passed in via `&str` references from an iterator.
|
||||||
@ -89,7 +89,7 @@ pub fn calc_fn_hash<'a>(
|
|||||||
s.finish()
|
s.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [INTERNALS] Alias to [`smallvec::SmallVec<[T; 4]>`](https://crates.io/crates/smallvec),
|
/// _[INTERNALS]_ Alias to [`smallvec::SmallVec<[T; 4]>`](https://crates.io/crates/smallvec),
|
||||||
/// which is a specialized `Vec` backed by a small, fixed-size array when there are <= 4 items stored.
|
/// which is a specialized `Vec` backed by a small, fixed-size array when there are <= 4 items stored.
|
||||||
/// Exported under the `internals` feature only.
|
/// Exported under the `internals` feature only.
|
||||||
pub type StaticVec<T> = SmallVec<[T; 4]>;
|
pub type StaticVec<T> = SmallVec<[T; 4]>;
|
||||||
|
Loading…
Reference in New Issue
Block a user