vector-builder-0.3.8.5: Vector builder
Safe HaskellSafe-Inferred
LanguageHaskell2010

VectorBuilder.Builder

Synopsis

Documentation

data Builder element Source #

An abstraction over the size of a vector for the process of its construction.

It postpones the actual construction of a vector until the execution of the builder.

Instances

Instances details
Monoid (Builder element) Source #

Provides support for O(1) concatenation.

Instance details

Defined in VectorBuilder.Core.Builder

Methods

mempty :: Builder element #

mappend :: Builder element -> Builder element -> Builder element #

mconcat :: [Builder element] -> Builder element #

Semigroup (Builder element) Source #

Provides support for O(1) concatenation.

Instance details

Defined in VectorBuilder.Core.Builder

Methods

(<>) :: Builder element -> Builder element -> Builder element #

sconcat :: NonEmpty (Builder element) -> Builder element #

stimes :: Integral b => b -> Builder element -> Builder element #

empty :: Builder element Source #

Empty builder.

singleton :: element -> Builder element Source #

Builder of a single element.

size :: Builder element -> Int Source #

Gets the size of a Builder.

vector :: Vector vector element => vector element -> Builder element Source #

Builder from an immutable vector of elements.

Supports all kinds of vectors: boxed, unboxed, primitive, storable.

foldable :: Foldable foldable => foldable element -> Builder element Source #