Skip to main content

Constraint

Trait Constraint 

pub trait Constraint: Sealed + 'static {
    const ALLOWED: IdSet;
    const MAX_LEN: usize = Vbi::MAX_USIZE;
    const REPEATABLE: IdSet = _;
}
Expand description

Marker trait describing which property IDs are permitted in a Properties or PropertiesBuf collection.

Implementors are zero-sized marker types used purely at the type level; the allowed set is exposed through the ALLOWED associated constant.

This trait is sealed and can only be implemented by the marker types provided by this crate.

Required Associated Constants§

const ALLOWED: IdSet

The set of Ids that are permitted under this constraint.

Provided Associated Constants§

const MAX_LEN: usize = Vbi::MAX_USIZE

The maximum length of the encoded properties, without the length prefix.

const REPEATABLE: IdSet = _

The Ids that may appear more than once. Repeating any other is a Protocol Error (§2.2.2.2).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§