Write-only references.

Many functions in Rust's standard library, such as char::encode_utf8 , take a mutable reference that they only ever write to.

This crate provides a way to express this guarantee:

WriteRef<T> provides a single method, write . By taking this as a parameter, a function guarantees that it will only ever write to it.

provides a single method, . By taking this as a parameter, a function guarantees that it will only ever write to it. WriteSlice<T> works similarly, but it allows writing only to individual elements. This is useful for functions that write to a provided buffer, such as char::encode_utf8 .