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§
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<'_>
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.