pub trait Wrapped:
ValueObject
+ WrappedInner
+ TryFrom<Self::Inner>{
// Required methods
fn as_inner(&self) -> &Self::Inner;
fn into_inner(self) -> Self::Inner;
}Expand description
A ValueObject newtype around a single WrappedInner::Inner value,
only constructible through validation (TryFrom<Self::Inner>).
Note this invariant only holds if the wrapped field is private - see
#[derive(ValueObject)] in ddd-toolkit-macro, which enforces that at
derive time.
Required Methods§
Sourcefn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Consumes self, returning the wrapped value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".