Expand description
Additional, more convenient, functionality, which leverages the Rust
standard library, layered on top of kul_core.
This crate:
-
Provides
Parsers, for ready-made use for common basic parsing applications, that set pre-chosen types for most of the generic parameters. -
Re-exports all of
kul_core. -
Provides
Datumreference types that wrap the standardBox,Rc, andArctypes, for heap-allocatingDatums. -
Provides
Texttypes that use heap allocation for their chunking. -
Provides
SourceStreamtypes suitable for efficient use with streaming sources that buffer into heap-allocated string chunks. It is possible to achieve minimal copying such that streamed data is only copied once from the OS into the user-space string chunks. Once buffered, these types produceTexttypes that have zero-copy operation. -
Avoids stack overflows (when possible) when dropping the provided heap-allocated
Datumtypes, so they can handle being used for very-deep trees (e.g. long lists), by using a customDropimplementation for them. (Otherwise the compiler’s default drop recursion could overflow.)
Unlike kul_core, this crate’s purpose mostly is to provide premade
implementations intended for ready use. So, instead of placing such items
in sub-modules named premade, they are placed at the top of their
respective modules, including for the premade items re-exported from
kul_core.
Re-exports§
pub use kul_core::*;
Modules§
- common
Parsers and related types and functions, provided for convenience, that use recommended types for instantiating many of the generic parameters of this crate, for common basic parsing applications.- datum
Datumreference types for heap-allocatingDatums. Also re-exports the core crate’s module and premades.- drop
- Custom handling of dropping for the heap-allocated
Datumtypes of this crate. Enables using very-deepDatumtrees, e.g. long lists, which would otherwise cause stack overflows when droppped (due to the compiler’s automatic recursive dropping). Can also be used for any otherDatumreference types of yours if they meet the requirements. - parser
- Types for
Parsers that use thestdlibrary, including heap allocation. Also re-exports the core crate’s module and premades. - source_
stream SourceStreamtypes that use thestdlibrary, including heap allocation.- text
Texttypes that use thestdlibrary, including heap allocation. Also re-exports the core crate’s module and premades.