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§

source

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.

source

fn write(_this: &Self::Inner, stream: &mut PrologStream) -> Result<()>

Write a description of this WrappedArcBlob.

The given stream implements Write, and therefore can be used with the write! macro.

The normal way of implementing this is to print something like "<blob_name ..blob_data..>". The default implementation simply prints "<blob_name>".

Object Safety§

This trait is not object safe.

Implementors§