Expand description
Thin wrapper around R list (VECSXP).
Provides safe construction from Rust values and typed extraction.
§Submodules
| Module | Contents |
|---|---|
accumulator | ListAccumulator — dynamic list construction with bounded protect stack |
named | NamedList — O(1) name-indexed access via HashMap index |
§Core Types
List— owned handle to an R list (VECSXP)ListMut— mutable view for in-place element replacementListBuilder— fixed-size batch constructionNamedListBuilder— owned, GC-rooted named lists and data framesBuiltList— the builder’s rooted plain-list finishIntoList/TryFromList— conversion traits
Re-exports§
pub use named_builder::BuiltList;pub use named_builder::NamedListBuilder;use crate::SEXPTYPE::NILSXP;🔒use crate::SEXPTYPE::STRSXP;🔒use crate::SEXPTYPE::VECSXP;🔒use crate::from_r::ElementCheck;🔒use crate::from_r::SexpError;🔒use crate::from_r::SexpLengthError;🔒use crate::from_r::SexpTypeError;🔒use crate::from_r::TryFromSexp;🔒use crate::from_r::map_vecsxp_batched;🔒use crate::from_r::no_element_check;🔒use crate::from_r::try_charsxp_to_str;🔒use crate::gc_protect::OwnedProtect;🔒use crate::into_r::IntoR;🔒use crate::sys;🔒use crate::SEXP;🔒use crate::SexpExt;🔒use std::collections::BTreeMap;🔒use std::collections::BTreeSet;🔒use std::collections::HashMap;🔒use std::collections::HashSet;🔒use std::hash::Hash;🔒use std::hash::Hash;🔒use crate::gc_protect::ProtectScope;🔒pub use accumulator::*;pub use named::*;
Modules§
- accumulator 🔒
ListAccumulator— unknown-length list construction with bounded stack usage.- named 🔒
NamedList— O(1) name-indexed access to R lists.- named_
builder 🔒 - Owned construction of heterogeneous named lists and data frames.
Macros§
Structs§
- List
- Owned handle to an R list (
VECSXP). - List
Builder - Builder for constructing lists with efficient protection management.
- ListMut
- Mutable view of an R list (
VECSXP).
Traits§
- Into
List - Convert things into an R list.
- TryFrom
List - Fallible conversion from an R list into a Rust value.
Functions§
- into_
list_ 👻column - Build an R list-column (VECSXP) from values converted one at a time through
IntoList. - into_
option_ 👻list_ column into_list_columnfor optional cells:NonebecomesNULL.- list_
element 🔒 - One element of a list of lists: a
VECSXP. A pairlist element is refused, asListrefuses a pairlist: a coerced copy would be a new object that nothing roots while the rest of the list is read. - text_
name 🔒 - The text of the name
charsxp, read with its own encoding (a Latin-1 name is translated);NoneforNAand for a name that is not text (marked as bytes, or not valid UTF-8), which nothing can look up by a Rust&str.