Trait efficient_enum::TaggableValue [] [src]

pub unsafe trait TaggableValue<TaggingMethod, Count: TagOptions> {
    fn untag(self) -> Self;
    fn untag_in_place(&mut self);
    fn get_tag(&self) -> Count::Options;
    fn change_tag_helper(v: &mut Self, o: Count::Options);
    fn fmt_untagged(a: &Self, f: &mut Formatter) -> Result where Self: Debug;
    fn eq(a: &Self, b: &Self) -> bool where Self: PartialEq;
    fn ne(a: &Self, b: &Self) -> bool where Self: PartialEq;

    fn tag_helper(v: &mut Self, o: Count::Options) { ... }
}

A trait representing a value which can have some space dedicated to use for tagging a union

Required Methods

Untags a value and returns it

Untags a value in place

Get's the tag associated with a value

A helper for changing the tag of a value

A helper debug printing a value as though it weren't tagged

A helper testing equality between tagged items

A helper testing inequality between tagged items

Provided Methods

A helper for initializing the tag of a value

Implementors