Skip to main content

ReflRepresenter

Trait ReflRepresenter 

Source
pub trait ReflRepresenter {
    type Item;

    // Required methods
    fn item_name(&self, ctx: &ReflRepresenterCtx<'_>) -> String;
    fn into_repr(
        &self,
        ctx: &ReflRepresenterCtx<'_>,
        v: &Self::Item,
    ) -> Option<ReflRepr>;

    // Provided method
    fn from_repr(
        &self,
        ctx: &ReflRepresenterCtx<'_>,
        v: &ReflRepr,
    ) -> Option<Self::Item> { ... }
}

Required Associated Types§

Required Methods§

Source

fn item_name(&self, ctx: &ReflRepresenterCtx<'_>) -> String

Source

fn into_repr( &self, ctx: &ReflRepresenterCtx<'_>, v: &Self::Item, ) -> Option<ReflRepr>

Provided Methods§

Source

fn from_repr( &self, ctx: &ReflRepresenterCtx<'_>, v: &ReflRepr, ) -> Option<Self::Item>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> ReflRepresenter for OptionReflRepresenter<T>
where T: 'static,

Source§

impl<T> ReflRepresenter for VecReflRepresenter<T>
where T: 'static,

Source§

type Item = Vec<T>