Trait DataObjectConstraint
pub trait DataObjectConstraint:
Sized
+ Debug
+ Display
+ PartialEq
+ Clone
+ Send
+ Sync {
type DataArg<'a>: Debug + Display + PartialEq + Clone + Send + Sync;
// Required method
fn as_arg(&self) -> Self::DataArg<'_>;
}Expand description
Used for statically defining the allowed types stored in DataObjects.
Required Associated Types§
type DataArg<'a>: Debug + Display + PartialEq + Clone + Send + Sync
type DataArg<'a>: Debug + Display + PartialEq + Clone + Send + Sync
Specifies the type of an argument that provides a value to the DataObject.
Generally, this type matches Self except for KanziString.
KanziString- Uses &KanziStrto avoid unnecessary allocations.
Required Methods§
fn as_arg(&self) -> Self::DataArg<'_>
fn as_arg(&self) -> Self::DataArg<'_>
Converts Self to a type accepted by DataObject::set_value.
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.