Trait arret_runtime::boxed::DistinctTagged[][src]

pub trait DistinctTagged: Boxed {
    fn has_tag(type_tag: TypeTag) -> bool;
}

Indicates that this boxed struct does not share type tags with unrelated types

For example, Num is DistinctTagged because it only shares type tags with Any, Float and Int which are all either subtypes or supertypes. As a counterexample, Vector<Str> is not because it shares a type tag with Vector<Sym>.

In mathematical terms this can be thought of as the struct being injective to the type tag

Required methods

fn has_tag(type_tag: TypeTag) -> bool[src]

Returns if the passed type tag corresponds to this type

Loading content...

Implementors

impl DistinctTagged for Any[src]

impl DistinctTagged for Bool[src]

impl DistinctTagged for Char[src]

impl DistinctTagged for False[src]

impl DistinctTagged for Float[src]

impl DistinctTagged for FunThunk[src]

impl DistinctTagged for Int[src]

impl DistinctTagged for List<Any>[src]

impl DistinctTagged for Map[src]

impl DistinctTagged for Nil[src]

impl DistinctTagged for Num[src]

impl DistinctTagged for Pair[src]

impl DistinctTagged for Record[src]

impl DistinctTagged for Set[src]

impl DistinctTagged for Str[src]

impl DistinctTagged for Sym[src]

impl DistinctTagged for True[src]

impl DistinctTagged for Vector[src]

Loading content...