arrow_buffer/lib.rs
1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements. See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership. The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License. You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied. See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18//! Low-level buffer abstractions for [Apache Arrow Rust](https://docs.rs/arrow)
19//!
20//! # Byte Storage abstractions
21//! - [`MutableBuffer`]: Raw memory buffer that can be mutated and grown
22//! - [`Buffer`]: Immutable buffer that is shared across threads
23//!
24//! # Typed Abstractions
25//!
26//! There are also several wrappers over [`Buffer`] with methods for
27//! easier manipulation:
28//!
29//! - [`BooleanBuffer`][]: Bitmasks (buffer of packed bits)
30//! - [`NullBuffer`][]: Arrow null (validity) bitmaps ([`BooleanBuffer`] with extra utilities)
31//! - [`ScalarBuffer<T>`][]: Typed buffer for primitive types (e.g., `i32`, `f64`)
32//! - [`OffsetBuffer<O>`][]: Offsets used in variable-length types (e.g., strings, lists)
33//! - [`RunEndBuffer<E>`][]: Run-ends used in run-encoded data
34//!
35//! # Platform Support
36//!
37//! Only little-endian platforms are officially supported and tested in CI.
38//! Big-endian platforms are not tested in CI and may not work correctly.
39//! Fixes for big-endian platforms are welcome and handled on a best-effort basis,
40//! but compatibility is not guaranteed.
41
42#![doc(
43 html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg",
44 html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg"
45)]
46#![cfg_attr(docsrs, feature(doc_cfg))]
47#![warn(missing_docs)]
48
49pub mod alloc;
50pub mod buffer;
51pub use buffer::*;
52
53pub mod builder;
54pub use builder::*;
55
56mod error;
57pub use error::OverflowError;
58
59mod bigint;
60pub use bigint::i256;
61
62mod bytes;
63
64mod native;
65pub use native::*;
66
67mod util;
68pub use util::*;
69
70mod interval;
71pub use interval::*;
72
73mod arith;
74
75#[cfg(feature = "pool")]
76mod pool;
77#[cfg(feature = "pool")]
78pub use pool::*;