pub trait FieldPayload:
Sized
+ AsRef<Self::Content>
+ AsMut<Self::Content>
+ From<Self::Content> {
type Content: FieldContentSource<Self>;
// Required method
fn into_content(self) -> Self::Content;
// Provided methods
fn from_content(content: Self::Content) -> Self { ... }
fn from_content_source<T>(content: T) -> Self
where T: FieldContentSource<Self> { ... }
fn into_locked_substate(self) -> FieldSubstate<Self> { ... }
fn into_unlocked_substate(self) -> FieldSubstate<Self> { ... }
}Expand description
This trait is intended to be implemented by an explicit new type for for the given
{ content: T } payload of a particular field.
Required Associated Types§
type Content: FieldContentSource<Self>
Required Methods§
fn into_content(self) -> Self::Content
Provided Methods§
fn from_content(content: Self::Content) -> Self
fn from_content_source<T>(content: T) -> Selfwhere
T: FieldContentSource<Self>,
fn into_locked_substate(self) -> FieldSubstate<Self>
fn into_unlocked_substate(self) -> FieldSubstate<Self>
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.