Struct runestr::rune [−][src]
pub struct rune(_, _);
Expand description
The rune type represents a user-perceived character.
Implementations
Convert a char to rune, returning None if it could not form a complete rune.
Convert a char to rune, modifying text to form a complete rune if necessary.
See crate documentation for more details on this.
Convert a &str consisting of a grapheme cluster to rune,
returning None if the input is not exactly a grapheme cluster or
it could not form a complete rune.
Convert a &str consisting of a grapheme cluster to rune,
tweaking the text a little if necessary,
or returning None if the input is not exactly a grapheme cluster.
Constructs a rune from its internal representation.
Retrieves the internal representation of this rune.
Retrieves the char this rune represents. Returns None if it represents
multiple chars.
Retrieves an iterator that iterate over all the chars this rune represents.
Returns the number of bytes this char would need if encoded in RuneStr.
That number of bytes is always between 1 and 6, inclusive.
Encode this rune as RuneStr into the provided byte buffer, and then returns the subslice of the buffer that contains the encoded rune.
Panics
Panics if the buffer is not large enough.
A buffer of length six is large enough to encode any rune.
Trait Implementations
Extends a collection with the contents of an iterator. Read more
extend_one)Extends a collection with exactly one element.
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Creates a value from an iterator. Read more
Auto Trait Implementations
impl !RefUnwindSafe for rune
impl UnwindSafe for rune
Blanket Implementations
Mutably borrows from an owned value. Read more