Struct rphtml::entity::Entity [−][src]
Entity struct
Fields
entity_in: Option<EntityIn>
characters: Vec<char, Global>
is_end: bool
Implementations
impl Entity
[src]
pub fn new() -> Entity
[src]
Return an Entity struct, same as Entity::default()
pub fn add(&mut self, ch: char) -> bool
[src]
add(ch: char)
: check if the character is an allowed character
pub fn decode(&self) -> Option<char>
[src]
decode()
: decode the entity, if ok, return the unicode character.
pub fn get_chars(&self) -> Vec<char, Global>ⓘ
[src]
get_chars()
return the characters of the entity,if it’s a correct entity, it will return the Vec with the decoded unicode character, otherwise return all the characters.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,