Skip to main content

Crate emoji256

Crate emoji256 

Source
Expand description

Encoding and decoding emoji256 strings.

For most cases, you can simply use the decode and encode functions. If you need a bit more control, use the traits ToEmoji256 and FromEmoji256 instead.

ยงExample

let hello_world = emoji256::encode("Hello world!");

println!("{}", hello_world); // Prints "๐Ÿ™๐Ÿ‘ฝ๐Ÿ’‰๐Ÿ’‰๐Ÿ’Œ๐Ÿญ๐Ÿ’ฆ๐Ÿ’Œ๐Ÿ’•๐Ÿ’‰๐Ÿ‘ป๐Ÿฐ"

Re-exportsยง

pub use crate::serde::deserialize;serde
pub use crate::serde::serialize;alloc and serde

Modulesยง

serdeserde
Emoji256 encoding with serde.

Enumsยง

FromEmoji256Error
The error type for decoding a emoji256 string into Vec<u8> or [u8; N].

Traitsยง

FromEmoji256
Types that can be decoded from a emoji256 string.
ToEmoji256
Encoding values as emoji256 string.

Functionsยง

decodealloc
Decodes a emoji256 string into raw bytes.
decode_to_slice
Decode a emoji256 string into a mutable bytes slice.
encodealloc
Encodes data as emoji256 string.
encode_to_slice
Encodes some bytes into a mutable slice of bytes.