struct Reader
pub struct Reader {
pub data string
pub sticky string
}Purpose
Public struct `Reader`.
Parameters
datastring- data
stickystring- field (string)
API
#compress/zlibzlib Reader/Writer with Adler-32; dictionaries rejected.
struct Readerpub struct Reader {
pub data string
pub sticky string
}Public struct `Reader`.
data stringsticky stringstruct Writerpub struct Writer {
pub buf string
pub out string
pub closed bool
}Public struct `Writer`.
buf stringout stringclosed boolnew_readerpub fn new_reader(data string) ReaderConstruct reader.
data stringReader — a value of this type
new_writerpub fn new_writer() WriterConstruct writer.
none
Writer — a value of this type
(&mut Reader) read_allpub fn (r &mut Reader) read_all() stringMethod on `&mut Reader`: read all. Throws on failure.
r &mut Readerstring — result string
(&mut Writer) writepub fn (w &mut Writer) write(data &string) intMethod on `&mut Writer`: write data and return the byte count. Throws on failure.
w &mut Writerdata &stringint — bytes written
(&mut Writer) write_stringpub fn (w &mut Writer) write_string(s string) intMethod on `&mut Writer`: write a string and return the byte count.
w &mut Writers stringint — bytes written
(&mut Writer) closepub fn (w &mut Writer) close() intMethod on `&mut Writer`: close the resource.
w &mut Writerint — a value of this type
(&Writer) bytespub fn (w &Writer) bytes() stringMethod on `&Writer`: return the buffered bytes.
w &Writerstring — result string
(&Writer) textpub fn (w &Writer) text() stringMethod on `&Writer`: return the current text.
w &Writerstring — result string