// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors
usevortex_error::VortexResult;usecrate::Canonical;usecrate::vtable::{NotSupported, VTable};pubtraitEncodeVTable<V: VTable> {/// Try to encode a canonical array into this encoding.
////// The given `like` array is passed as a template, for example if the caller knows that
/// this encoding was successfully used previously for a similar array.
////// If the encoding does not support the given array (e.g. [`crate::arrays::ConstantEncoding`]
/// was passed a non-constant array), then `None` is returned.
fnencode(encoding:&V::Encoding,
canonical:&Canonical,
like:Option<&V::Array>,
)->VortexResult<Option<V::Array>>;}/// Default implementation for encodings that do not support encoding.
impl<V: VTable>EncodeVTable<V>forNotSupported{fnencode(_encoding:&V::Encoding,
_canonical:&Canonical,
_like:Option<&V::Array>,
)->VortexResult<Option<V::Array>>{Ok(None)}}