Skip to content

Instantly share code, notes, and snippets.

@roneygomes
Created November 27, 2021 02:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save roneygomes/3176539abaa5edc92e85ae5632f1ce59 to your computer and use it in GitHub Desktop.
pub trait Write {
// escreve um buffer nesse escritor retornando
// quantos bytes foram escritos em caso de sucesso
fn write(&mut self, buf: &[u8]) -> Result<usize>;
// limpa o escritor, garantindo que qualquer conteúdo
// armazenado em buffers intermediários seja persistido
// no armazenamento final
fn flush(&mut self) -> Result<()>;
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment