htmlentity 1.3.2

A library for encoding and decoding HTML entities.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::{borrow::Cow, collections::HashMap, ops::RangeInclusive};

use crate::entity::EntityType;

pub type Byte = u8;
pub type ByteList = Vec<Byte>;
pub type Bytes = &'static [Byte];
pub type EntityCharBytes = HashMap<char, Bytes>;
pub type BytesCharEntity = HashMap<Bytes, char>;
pub type AnyhowResult<T> = anyhow::Result<T>;
pub type StringResult = AnyhowResult<String>;
pub type CharListResult = AnyhowResult<Vec<char>>;
pub type CodeRange = RangeInclusive<usize>;
pub type CodeRangeTuple = (usize, usize);
pub type IterDataItem<'a> = (&'a Byte, Option<CodeRangeTuple>);
pub type EncodeFilterReturnData = (bool, Option<(EntityType, Cow<'static, [Byte]>)>);