Trait miniconf::Transcode

source ·
pub trait Transcode {
    // Required method
    fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
       where M: TreeKey + ?Sized,
             K: IntoKeys;
}
Expand description

Look up an IntoKeys in a TreeKey and transcode it.

Required Methods§

source

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

Perform a node lookup of a K: IntoKeys on a M: TreeKey<Y> and transcode it.

This modifies self such that afterwards Self: IntoKeys can be used on M again. It returns a Node with node type and depth information.

Returning Err(Traversal::TooShort(depth)) indicates that there was insufficient capacity and a key could not be encoded at the given depth.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Transcode for ()

Shim to provide the bare Node lookup without transcoding target

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [i8]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [i16]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [i32]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [i64]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [i128]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [isize]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [u8]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [u16]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [u32]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [u64]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [u128]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl Transcode for [usize]

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

source§

impl<T: Transcode + ?Sized> Transcode for &mut T

source§

fn transcode<M, K>(&mut self, keys: K) -> Result<Node, Traversal>
where M: TreeKey + ?Sized, K: IntoKeys,

Implementors§

source§

impl Transcode for Packed

source§

impl<T: AsMut<[usize]> + ?Sized> Transcode for Indices<T>

source§

impl<T: Write + ?Sized> Transcode for JsonPath<T>

source§

impl<T: Write + ?Sized, const S: char> Transcode for Path<T, S>