pub trait Mappable {
type MatrixReference: ?Sized + Eq + Hash + ToOwned<Owned = Self::MatrixType>;
type MatrixType: Eq + Hash + Borrow<Self::MatrixReference>;
type ExternalReference: ?Sized + Eq + Hash + ToOwned<Owned = Self::ExternalType>;
type ExternalType: Eq + Hash + Borrow<Self::ExternalReference>;
// Required methods
fn as_matrix(&self) -> &Self::MatrixReference;
fn into_matrix(self) -> Self::MatrixType;
fn as_external(&self) -> &Self::ExternalReference;
fn into_external(self) -> Self::ExternalType;
fn into_split(self) -> (Self::MatrixType, Self::ExternalType);
}
Expand description
Represents an object that has both a Matrix ID and an external ID.
Required Associated Types§
type MatrixReference: ?Sized + Eq + Hash + ToOwned<Owned = Self::MatrixType>
type MatrixType: Eq + Hash + Borrow<Self::MatrixReference>
type ExternalReference: ?Sized + Eq + Hash + ToOwned<Owned = Self::ExternalType>
type ExternalType: Eq + Hash + Borrow<Self::ExternalReference>
Required Methods§
Sourcefn as_matrix(&self) -> &Self::MatrixReference
fn as_matrix(&self) -> &Self::MatrixReference
Get a reference to the Matrix ID of this object.
Sourcefn into_matrix(self) -> Self::MatrixType
fn into_matrix(self) -> Self::MatrixType
Convert this object into an owned Matrix ID of this object.
Sourcefn as_external(&self) -> &Self::ExternalReference
fn as_external(&self) -> &Self::ExternalReference
Get a reference to the external ID of this object.
Sourcefn into_external(self) -> Self::ExternalType
fn into_external(self) -> Self::ExternalType
Convert this object into an owned external ID of this object.
Sourcefn into_split(self) -> (Self::MatrixType, Self::ExternalType)
fn into_split(self) -> (Self::MatrixType, Self::ExternalType)
Split this object into owned matrix type and external type.