multi-util 1.0.2

Multiformat utility functions and types
1
2
3
4
5
6
7
8
9
10
11
// SPDX-License-Identifier: Apache-2.0
use crate::prelude::Codec;

/// This trait exposes the codec information for multicoded types
pub trait CodecInfo {
    /// return the preferred codec associated with this object
    fn preferred_codec() -> Codec;

    /// return the actual codec associated with this object
    fn codec(&self) -> Codec;
}