MCPcopy Create free account
hub / github.com/apache/arrow-rs / FixedLengthEncoding

Interface FixedLengthEncoding

arrow-row/src/fixed.rs:47–55  ·  view source on GitHub ↗

Encodes a value of a particular fixed width type into bytes according to the rules described on [`super::RowConverter`]

Source from the content-addressed store, hash-verified

45/// Encodes a value of a particular fixed width type into bytes according to the rules
46/// described on [`super::RowConverter`]
47pub trait FixedLengthEncoding: Copy {
48 const ENCODED_LEN: usize = 1 + std::mem::size_of::<Self::Encoded>();
49
50 type Encoded: Sized + Copy + FromSlice + AsRef<[u8]> + AsMut<[u8]>;
51
52 fn encode(self) -> Self::Encoded;
53
54 fn decode(encoded: Self::Encoded) -> Self;
55}
56
57impl FixedLengthEncoding for bool {
58 type Encoded = [u8; 1];

Callers

nothing calls this directly

Implementers 1

fixed.rsarrow-row/src/fixed.rs

Calls

no outgoing calls

Tested by

no test coverage detected