Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Added MutableBinaryValuesArray #1276

Merged
merged 1 commit into from Oct 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/array/binary/iterator.rs
Expand Up @@ -3,7 +3,7 @@ use crate::{
bitmap::utils::ZipValidity,
};

use super::BinaryArray;
use super::{BinaryArray, MutableBinaryValuesArray};

unsafe impl<'a, O: Offset> ArrayAccessor<'a> for BinaryArray<O> {
type Item = &'a [u8];
Expand All @@ -30,3 +30,15 @@ impl<'a, O: Offset> IntoIterator for &'a BinaryArray<O> {
self.iter()
}
}

/// Iterator of values of an [`MutableBinaryValuesArray`].
pub type MutableBinaryValuesIter<'a, O> = ArrayValuesIter<'a, MutableBinaryValuesArray<O>>;

impl<'a, O: Offset> IntoIterator for &'a MutableBinaryValuesArray<O> {
type Item = &'a [u8];
type IntoIter = MutableBinaryValuesIter<'a, O>;

fn into_iter(self) -> Self::IntoIter {
self.iter()
}
}
2 changes: 2 additions & 0 deletions src/array/binary/mod.rs
Expand Up @@ -21,6 +21,8 @@ pub(super) mod fmt;
mod iterator;
pub use iterator::*;
mod from;
mod mutable_values;
pub use mutable_values::*;
mod mutable;
pub use mutable::*;

Expand Down