Expand description
Additional, more convenient, functionality, which leverages the Rust
standard library, layered on top of kul_core
.
This crate:
-
Provides
Parser
s, 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
Datum
reference types that wrap the standardBox
,Rc
, andArc
types, for heap-allocatingDatum
s. -
Provides
Text
types that use heap allocation for their chunking. -
Provides
SourceStream
types 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 produceText
types that have zero-copy operation. -
Avoids stack overflows (when possible) when dropping the provided heap-allocated
Datum
types, so they can handle being used for very-deep trees (e.g. long lists), by using a customDrop
implementation 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
Parser
s 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
Datum
reference types for heap-allocatingDatum
s. Also re-exports the core crate’s module and premades.- drop
- Custom handling of dropping for the heap-allocated
Datum
types of this crate. Enables using very-deepDatum
trees, 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 otherDatum
reference types of yours if they meet the requirements. - parser
- Types for
Parser
s that use thestd
library, including heap allocation. Also re-exports the core crate’s module and premades. - source_
stream SourceStream
types that use thestd
library, including heap allocation.- text
Text
types that use thestd
library, including heap allocation. Also re-exports the core crate’s module and premades.