risingwave_common::hash

Trait Buffer

source
pub trait Buffer: BufMut + 'static {
    type Sealed;

    // Required methods
    fn alloc() -> bool;
    fn with_capacity(cap: usize) -> Self;
    fn seal(self) -> Self::Sealed;
}
Expand description

Associated type for KeyStorage used to build the hash key.

Required Associated Types§

source

type Sealed

The sealed key type.

Required Methods§

source

fn alloc() -> bool

Returns whether this buffer allocates on the heap.

source

fn with_capacity(cap: usize) -> Self

Creates a new buffer with the given capacity.

source

fn seal(self) -> Self::Sealed

Seals the buffer and returns the sealed key.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Buffer for Vec<u8>

source§

type Sealed = Box<[u8]>

source§

fn alloc() -> bool

source§

fn with_capacity(cap: usize) -> Self

source§

fn seal(self) -> Self::Sealed

Implementors§

source§

impl<const N: usize> Buffer for StackBuffer<N>

source§

type Sealed = [u8; N]