Skip to content

Commit

Permalink
Docstring for ArrowString
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Aug 7, 2023
1 parent bd2c2ac commit 33e3c1a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/re_types/src/arrow_adapter.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
use arrow2::buffer::Buffer;

/// Convenience-wrapper around an arrow [`Buffer`] that is known to contain a
/// string.
///
/// The arrow2 [`Buffer`] object is internally reference-counted and can be
/// easily converted back to a `&str` referencing the underlying storage.
/// This avoids some of the lifetime complexities that would otherwise
/// arise from returning a `&str` directly, but is significantly more
/// performant than doing the full allocation necessary to return a `String`.
#[derive(Clone, Debug, Default)]
pub struct ArrowString(pub Buffer<u8>);

Expand Down

0 comments on commit 33e3c1a

Please sign in to comment.