Write
interface Write
The Writer interface used to writing bytes to a resource.
Methods
Write bytes to self the given buffer.
Write bytes to self the given buffer.
Write bytes to self the given buffer.
[src]
fn flush(self) throws IoError {}
Flush this output stream, ensuring that all intermediately buffered contents reach their destination.
[src]
fn flush(self) throws IoError {}
Flush this output stream, ensuring that all intermediately buffered contents reach their destination.
Flush this output stream, ensuring that all intermediately buffered contents reach their destination.
write_string
pub fn write_string(self, str: string) throws IoError
[src]
fn write_string(self, str: string) throws IoError {
try self.write_all(str.bytes());
}
Write a string to self.
write_string
pub fn write_string(self, str: string) throws IoError
[src]
fn write_string(self, str: string) throws IoError {
try self.write_all(str.bytes());
}
Write a string to self.
Write a string to self.
[src]
fn write_all(self, buf: Bytes) throws IoError {
while (buf.len() > 0) {
let n = try self.write(buf);
buf = buf.slice(n, buf.len());
}
}
Attempts to write an entire buffer.
[src]
fn write_all(self, buf: Bytes) throws IoError {
while (buf.len() > 0) {
let n = try self.write(buf);
buf = buf.slice(n, buf.len());
}
}
Attempts to write an entire buffer.
Attempts to write an entire buffer.
to_write_close
pub fn to_write_close(self, f: |()|): WriteClose
[src]
fn to_write_close(self, f: |() throws IoError|): WriteClose {
return WriteCloseFn { writer: self, close_fn: f };
}
Create a WriteClose
interface from this Write
interface with a close function.
to_write_close
pub fn to_write_close(self, f: |()|): WriteClose
[src]
fn to_write_close(self, f: |() throws IoError|): WriteClose {
return WriteCloseFn { writer: self, close_fn: f };
}
Create a WriteClose
interface from this Write
interface with a close function.
Create a WriteClose
interface from this Write
interface with a close function.
to_nop_write_close
pub fn to_nop_write_close(self): WriteClose
[src]
fn to_nop_write_close(self): WriteClose {
return self.to_write_close(|| {});
}
Returns a ReadClose
with a no-op close
method wrapping this Read
to_nop_write_close
pub fn to_nop_write_close(self): WriteClose
[src]
fn to_nop_write_close(self): WriteClose {
return self.to_write_close(|| {});
}
Returns a ReadClose
with a no-op close
method wrapping this Read
Returns a ReadClose
with a no-op close
method wrapping this Read