pub trait ExtractContext<M>: Sized {
    type Context;
    type Error;

    // Required method
    fn extract_context(
        value: Meta<Self, M>
    ) -> Result<Meta<Self::Context, M>, Self::Error>;
}
Expand description

Context extraction method.

Implemented by documents containing a JSON-LD context definition, providing a method to extract this context.

Required Associated Types§

source

type Context

Context definition type.

source

type Error

Error type.

May be raised if the inner context is missing or invalid.

Required Methods§

source

fn extract_context( value: Meta<Self, M> ) -> Result<Meta<Self::Context, M>, Self::Error>

Extract the context definition.

Implementations on Foreign Types§

source§

impl<M: Clone> ExtractContext<M> for Value<M>

§

type Context = Value<M>

§

type Error = Meta<ExtractContextError<M>, M>

source§

fn extract_context( Meta: Meta<Self, M> ) -> Result<Meta<Self::Context, M>, Self::Error>

Implementors§