Trait swipl::blob::WrappedArcBlobImpl
source · pub trait WrappedArcBlobImpl: WrappedArcBlobBase {
// Provided methods
fn compare(_this: &Self::Inner, _other: &Self::Inner) -> Ordering { ... }
fn write(_this: &Self::Inner, stream: &mut PrologStream) -> Result<()> { ... }
}
Expand description
Supertype of WrappedArcBlob that allows implementation of
compare
and write
.
When defining a WrappedArcBlob through the wrapped_arc_blob! macro without the ‘defaults’ argument, you’re required to implement this trait for your type. This allows you to modify how comparison and writing will happen.
Provided Methods§
sourcefn compare(_this: &Self::Inner, _other: &Self::Inner) -> Ordering
fn compare(_this: &Self::Inner, _other: &Self::Inner) -> Ordering
Compare two values, returning an Ordering.
This is used from SWI-Prolog when sorting lists. The default
implementation returns Ordering::Equal
, effectively
providing no sorting information.
Object Safety§
This trait is not object safe.