Skip to main content

trait.TagRef

pub trait TagRef<T>: Display + ToOwned<Owned = T> + PartialEq<T> + Eq + Hash where
    T: Tag + Borrow<Self>, { }

A reference to a Tag.

  • Display so that we can still convert this tag to a JavaScript string.
  • ToOwned to make sure we can clone it into the owned tag in specific cases.
  • PartialEq so that we can compare refs to the owned tags easily.
  • Hash + Eq because we want to be able to use a ref as a key to internal hashmaps.

Implementors#

impl<T, R> TagRef<T> for R where T: Tag + Borrow<R>, R: Display + ToOwned<Owned = T> + PartialEq<T> + Eq + Hash + ?Sized,#

Automatically implement TagRef for all types that fit the requirements.

Loading content...