Skip to main content

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 encoded data
34
35#![doc(
36    html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg",
37    html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg"
38)]
39#![cfg_attr(docsrs, feature(doc_cfg))]
40#![deny(clippy::allow_attributes)]
41#![warn(missing_docs)]
42
43pub mod alloc;
44pub mod buffer;
45pub use buffer::*;
46
47pub mod builder;
48pub use builder::*;
49
50mod bigint;
51pub use bigint::i256;
52
53mod bytes;
54
55mod native;
56pub use native::*;
57
58mod util;
59pub use util::*;
60
61mod interval;
62pub use interval::*;
63
64mod arith;
65
66#[cfg(feature = "pool")]
67mod pool;
68#[cfg(feature = "pool")]
69pub use pool::*;