Introduce the AttrCount type

This commit is contained in:
Clément Renault 2019-11-27 17:01:23 +01:00 committed by Clément Renault
parent 5b9fff6636
commit 11f3d7782d
No known key found for this signature in database
GPG key ID: 0151CDAB43460DAE
7 changed files with 22 additions and 14 deletions

View file

@ -63,3 +63,11 @@ pub struct Highlight {
/// without needing to run the tokenizer again.
pub char_length: u16,
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "zerocopy", derive(AsBytes, FromBytes))]
#[repr(C)]
pub struct AttrCount {
pub attr: u16,
pub count: u16,
}