Skip to main content

SubsetOf

Trait SubsetOf 

Source
pub unsafe trait SubsetOf<Super>: Format
where Super: Format,
{ // Provided method fn revalidate_subset(x: &[u8]) -> bool { ... } }
Expand description

Indicates that one format is a subset of another.

The subset format can be converted to the superset format for free.

Provided Methods§

Source

fn revalidate_subset(x: &[u8]) -> bool

Validate the other direction of conversion; check if this buffer from the superset format conforms to the subset format.

The default calls Self::validate, but some conversions may implement a check which is cheaper than validating from scratch.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§