Trait netstack3_base::socketmap::Tagged

source ·
pub trait Tagged<A> {
    type Tag: Copy + Eq + Debug;

    // Required method
    fn tag(&self, address: &A) -> Self::Tag;
}
Expand description

A type whose values can be used to produce “tag” values of a different type.

This can be used to provide a summary value, e.g. even or odd for an integer-like type.

Required Associated Types§

source

type Tag: Copy + Eq + Debug

The tag type.

Required Methods§

source

fn tag(&self, address: &A) -> Self::Tag

Returns the tag value for self at the given address.

This function must be deterministic, such that calling Tagged::tag on the same values always returns the same tag value.

Implementors§