Expand description
A simple crate implementing a struct wrapping a reader and writer that’s used to create readers to unique data.
Structs§
- IOInterner
- A struct wrapping a
Mutex<T>used for storing and retrieving data thought readers. - IOObj
- A struct generated by [
IOEntry::get_object]. - IOPos
- Struct stating which data
IOObjwill read from theIOInternerinternal IO object.
Constants§
- BUF_LEN
- Internal buffer length used in many free functions of this crate,put here if in the future some
way of create it at compile time it’s implemented,only thinkable way it’s
option_env!("IOINTERNER_BUF_LEN").and_then(|e| e.trim().parse().ok()).unwrap_or(512)but, except foroption_env!andOption::{and_then, unwrap_or},cannot be put into a constant.
Functions§
- cmp
- Compares the contents of
xto the ones ofy,seelexicographical comparison. - eq
- Checks if the contents of the reader
xare the ones ofy. - find
- Checks if the contents of
needleare inhaystack. - hash
- Hash the contents of the reader
xtostate. - io_op
- Pass to
callbackslices with lenght up to 512 contained in both readers until either one reach EOF and returnsNoneor whencallbackreturnsSome,that case this function will return it. - io_
unary_ op - Like
io_op,but with only one reader and slice passed down tocallback. - rfind
- Checks if the contents of
needleare inhaystackstarting from the end. - starts_
with - Checks if the first contents of the reader
haystackare the ones ofneedle,an empty needle is always true. - to_utf8
- Convert the contents of the
readerinto valid UTF-8 and pass it to callback,passing inNonewhen some bytes are not.