Trait rel_core::BasisPointee
source · [−]pub trait BasisPointee<B: Basis>: Pointee {
type BasisMetadata: Copy + Send + Sync + Ord + Hash + Unpin;
type FromNativeError: Debug;
type ToNativeError: Debug;
fn from_native_metadata(
metadata: Self::Metadata
) -> Result<Self::BasisMetadata, Self::FromNativeError>;
fn to_native_metadata(
metadata: Self::BasisMetadata
) -> Result<Self::Metadata, Self::ToNativeError>;
}
Expand description
A Pointee
with metadata that changes with a choice of basis.
Required Associated Types
sourcetype BasisMetadata: Copy + Send + Sync + Ord + Hash + Unpin
type BasisMetadata: Copy + Send + Sync + Ord + Hash + Unpin
The metadata associated with the pointee in the chosen basis.
sourcetype FromNativeError: Debug
type FromNativeError: Debug
An error occurred while converting metadata from the native representation.
sourcetype ToNativeError: Debug
type ToNativeError: Debug
An error occurred while converting metadata to the native representation.
Required Methods
sourcefn from_native_metadata(
metadata: Self::Metadata
) -> Result<Self::BasisMetadata, Self::FromNativeError>
fn from_native_metadata(
metadata: Self::Metadata
) -> Result<Self::BasisMetadata, Self::FromNativeError>
Returns the pointer metadata in B
corresponding to the given native
pointer metadata, or Err
if the conversion failed.
sourcefn to_native_metadata(
metadata: Self::BasisMetadata
) -> Result<Self::Metadata, Self::ToNativeError>
fn to_native_metadata(
metadata: Self::BasisMetadata
) -> Result<Self::Metadata, Self::ToNativeError>
Returns the native pointer metadata corresponding to the given pointer
metadata in B
, or Err
if the conversion failed.