pub trait ValueTransformer {
    type Type;
    type Borrow<'r>
       where Self::Type: 'r;
    type BorrowMut<'r>
       where Self::Type: 'r;
    type Dependency;
    type Owned;
    type Ref;
    type RefMut;

    // Required methods
    fn from_owned(registry: &Registry, value: Self::Type) -> Self::Owned;
    fn from_ref(
        registry: &Registry,
        value: &Self::Type,
        dependency: Option<Self::Dependency>
    ) -> Self::Ref;
    fn from_ref_mut(
        registry: &Registry,
        value: &mut Self::Type,
        dependency: Option<Self::Dependency>
    ) -> Self::RefMut;
    fn into_owned(value: Self::Owned) -> Self::Type;
    fn into_ref(value: &Self::Ref) -> Self::Borrow<'_>;
    fn into_ref_mut(value: &mut Self::RefMut) -> Self::BorrowMut<'_>;
}

Required Associated Types§

source

type Type

source

type Borrow<'r> where Self::Type: 'r

source

type BorrowMut<'r> where Self::Type: 'r

source

type Dependency

source

type Owned

source

type Ref

source

type RefMut

Required Methods§

source

fn from_owned(registry: &Registry, value: Self::Type) -> Self::Owned

source

fn from_ref( registry: &Registry, value: &Self::Type, dependency: Option<Self::Dependency> ) -> Self::Ref

source

fn from_ref_mut( registry: &Registry, value: &mut Self::Type, dependency: Option<Self::Dependency> ) -> Self::RefMut

source

fn into_owned(value: Self::Owned) -> Self::Type

source

fn into_ref(value: &Self::Ref) -> Self::Borrow<'_>

source

fn into_ref_mut(value: &mut Self::RefMut) -> Self::BorrowMut<'_>

Object Safety§

This trait is not object safe.

Implementors§