OxiExtract

Trait OxiExtract 

Source
pub trait OxiExtract {
    type Out;

    // Required method
    fn extract_from_dict(
        key: &str,
        value: &Object,
        dict: &Dictionary,
    ) -> Result<Self::Out>;
}
Expand description

Trait for extracting typed values from Nvim objects.

Required Associated Types§

Required Methods§

Source

fn extract_from_dict( key: &str, value: &Object, dict: &Dictionary, ) -> Result<Self::Out>

Extracts a typed value from an Nvim Object by key from a Dictionary with error context.

§Errors
  • The value has a different kind than expected for the target type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl OxiExtract for String

Implementation for extracting String values from Nvim objects.