byte_buf
fd_t
mem_buffer
fileflag
seek_style
reader
writer
extensions of iter::base_iter<A> for IMPL_T<A>
extensions for IMPL_T<A>
extensions for *T
- Extension methods for pointersextensions for dvec<A>
extensions for dvec<A>
reader of reader for *libc::FILE
reader of reader for {base: T, cleanup: C,}
reader of reader for byte_buf
reader_util for reader
writer of writer for {base: T, cleanup: C,}
writer of writer for *libc::FILE
writer of writer for fd_t
writer of writer for mem_buffer
writer_util for writer
FILE_reader
FILE_writer
buffered_file_writer
bytes_reader
bytes_reader_between
convert_whence
fd_writer
file_reader
file_writer
mem_buffer
mem_buffer_buf
mem_buffer_str
mem_buffer_writer
mk_file_writer
print
println
read_whole_file
read_whole_file_str
seek_in_buf
stderr
stdin
stdout
str_reader
u64_from_be_bytes
u64_to_be_bytes
u64_to_le_bytes
with_buf_writer
with_bytes_reader
with_bytes_reader_between
with_str_reader
with_str_writer
io::fsync
io::rustrt
byte_buf
type byte_buf = {buf: ~[const u8], mut pos: uint, len: uint,}
fd_t
type fd_t = c_int
mem_buffer
type mem_buffer = @{buf: dvec<u8>, mut pos: uint,}
fileflag
append
create
truncate
no_flag
seek_style
seek_set
seek_end
seek_cur
reader
read_bytes
fn read_bytes(uint) -> ~[u8]
read_byte
fn read_byte() -> int
unread_byte
fn unread_byte(int)
eof
fn eof() -> bool
seek
fn seek(int, seek_style)
tell
fn tell() -> uint
writer
write
fn write(v: & [const u8])
seek
fn seek(int, seek_style)
tell
fn tell() -> uint
flush
fn flush() -> int
extensions of iter::base_iter<A> for IMPL_T<A>
each
fn each(blk: fn(A) -> bool)
size_hint
fn size_hint() -> option<uint>
eachi
fn eachi(blk: fn(uint, A) -> bool)
all
fn all(blk: fn(A) -> bool) -> bool
any
fn any(blk: fn(A) -> bool) -> bool
foldl
fn foldl<B>(+b0: B, blk: fn(B, A) -> B) -> B
contains
fn contains(x: A) -> bool
count
fn count(x: A) -> uint
position
fn position(f: fn(A) -> bool) -> option<uint>
extensions for IMPL_T<A>
filter_to_vec
fn filter_to_vec(pred: fn(A) -> bool) -> ~[A]
map_to_vec
fn map_to_vec<B>(op: fn(A) -> B) -> ~[B]
to_vec
fn to_vec() -> ~[A]
min
fn min() -> A
max
fn max() -> A
find
fn find(p: fn(A) -> bool) -> option<A>
extensions for *T
Extension methods for pointers
is_null
pure fn is_null() -> bool
Returns true if the pointer is equal to the null pointer.
is_not_null
pure fn is_not_null() -> bool
Returns true if the pointer is not equal to the null pointer.
extensions for dvec<A>
swap
fn swap(f: fn(-~[mut A]) -> ~[mut A])
Swaps out the current vector and hands it off to a user-provided function f
. The function should transform it however is desired and return a new vector to replace it with.
len
fn len() -> uint
Returns the number of elements currently in the dvec
set
fn set(+w: ~[mut A])
Overwrite the current contents
pop
fn pop() -> A
Remove and return the last element
unshift
fn unshift(-t: A)
Insert a single item at the front of the list
push
fn push(+t: A)
Append a single item to the end of the list
shift
fn shift() -> A
Remove and return the first element
extensions for dvec<A>
push_all
fn push_all(ts: & [const A])
Append all elements of a vector to the end of the list
Equivalent to append_iter()
but potentially more efficient.
push_slice
fn push_slice(ts: & [const A], from_idx: uint, to_idx: uint)
Appends elements from from_idx
to to_idx
(exclusive)
get
fn get() -> ~[A]
Gets a copy of the current contents.
See unwrap()
if you do not wish to copy the contents.
[]
fn [](idx: uint) -> A
Copy out an individual element
get_elt
fn get_elt(idx: uint) -> A
Copy out an individual element
set_elt
fn set_elt(idx: uint, a: A)
Overwrites the contents of the element at idx
with a
grow_set_elt
fn grow_set_elt(idx: uint, initval: A, val: A)
Overwrites the contents of the element at idx
with a
, growing the vector if necessary. New elements will be initialized with initval
last
fn last() -> A
Returns the last element, failing if the vector is empty
reach
fn reach(f: fn(A) -> bool)
Iterates over the elements in reverse order
reader of reader for *libc::FILE
read_bytes
fn read_bytes(len: uint) -> ~[u8]
read_byte
fn read_byte() -> int
unread_byte
fn unread_byte(byte: int)
eof
fn eof() -> bool
seek
fn seek(offset: int, whence: seek_style)
tell
fn tell() -> uint
reader of reader for {base: T, cleanup: C,}
read_bytes
fn read_bytes(len: uint) -> ~[u8]
read_byte
fn read_byte() -> int
unread_byte
fn unread_byte(byte: int)
eof
fn eof() -> bool
seek
fn seek(off: int, whence: seek_style)
tell
fn tell() -> uint
reader of reader for byte_buf
read_bytes
fn read_bytes(len: uint) -> ~[u8]
read_byte
fn read_byte() -> int
unread_byte
fn unread_byte(_byte: int)
eof
fn eof() -> bool
seek
fn seek(offset: int, whence: seek_style)
tell
fn tell() -> uint
reader_util for reader
read_chars
fn read_chars(n: uint) -> ~[char]
read_char
fn read_char() -> char
read_line
fn read_line() -> str
read_c_str
fn read_c_str() -> str
read_le_uint
fn read_le_uint(size: uint) -> uint
read_le_int
fn read_le_int(size: uint) -> int
read_be_uint
fn read_be_uint(size: uint) -> uint
read_whole_stream
fn read_whole_stream() -> ~[u8]
each_byte
fn each_byte(it: fn(int) -> bool)
each_char
fn each_char(it: fn(char) -> bool)
each_line
fn each_line(it: fn(str) -> bool)
writer of writer for {base: T, cleanup: C,}
write
fn write(bs: & [const u8])
seek
fn seek(off: int, style: seek_style)
tell
fn tell() -> uint
flush
fn flush() -> int
writer of writer for *libc::FILE
write
fn write(v: & [const u8])
seek
fn seek(offset: int, whence: seek_style)
tell
fn tell() -> uint
flush
fn flush() -> int
writer of writer for fd_t
write
fn write(v: & [const u8])
seek
fn seek(_offset: int, _whence: seek_style)
tell
fn tell() -> uint
flush
fn flush() -> int
writer of writer for mem_buffer
write
fn write(v: & [const u8])
seek
fn seek(offset: int, whence: seek_style)
tell
fn tell() -> uint
flush
fn flush() -> int
writer_util for writer
write_char
fn write_char(ch: char)
write_str
fn write_str(s: str/& )
write_line
fn write_line(s: str/& )
write_int
fn write_int(n: int)
write_uint
fn write_uint(n: uint)
write_le_uint
fn write_le_uint(n: uint, size: uint)
write_le_int
fn write_le_int(n: int, size: uint)
write_be_uint
fn write_be_uint(n: uint, size: uint)
write_be_int
fn write_be_int(n: int, size: uint)
write_be_u64
fn write_be_u64(n: u64)
write_be_u32
fn write_be_u32(n: u32)
write_be_u16
fn write_be_u16(n: u16)
write_be_i64
fn write_be_i64(n: i64)
write_be_i32
fn write_be_i32(n: i32)
write_be_i16
fn write_be_i16(n: i16)
write_le_u64
fn write_le_u64(n: u64)
write_le_u32
fn write_le_u32(n: u32)
write_le_u16
fn write_le_u16(n: u16)
write_le_i64
fn write_le_i64(n: i64)
write_le_i32
fn write_le_i32(n: i32)
write_le_i16
fn write_le_i16(n: i16)
write_u8
fn write_u8(n: u8)
FILE_reader
fn FILE_reader(f: *libc::FILE, cleanup: bool) -> reader
FILE_writer
fn FILE_writer(f: *libc::FILE, cleanup: bool) -> writer
buffered_file_writer
fn buffered_file_writer(path: str) -> result<writer, str>
bytes_reader
fn bytes_reader(bytes: ~[u8]) -> reader
bytes_reader_between
fn bytes_reader_between(bytes: ~[u8], start: uint, end: uint) -> reader
convert_whence
fn convert_whence(whence: seek_style) -> i32
fd_writer
fn fd_writer(fd: fd_t, cleanup: bool) -> writer
file_reader
fn file_reader(path: str) -> result<reader, str>
file_writer
fn file_writer(path: str, flags: ~[fileflag]) -> result<writer, str>
mem_buffer
fn mem_buffer() -> mem_buffer
mem_buffer_buf
fn mem_buffer_buf(b: mem_buffer) -> ~[u8]
mem_buffer_str
fn mem_buffer_str(b: mem_buffer) -> str
mem_buffer_writer
fn mem_buffer_writer(b: mem_buffer) -> writer
mk_file_writer
fn mk_file_writer(path: str, flags: ~[fileflag]) -> result<writer, str>
print
fn print(s: str)
println
fn println(s: str)
read_whole_file
fn read_whole_file(file: str) -> result<~[u8], str>
read_whole_file_str
fn read_whole_file_str(file: str) -> result<str, str>
seek_in_buf
fn seek_in_buf(offset: int, pos: uint, len: uint, whence: seek_style) -> uint
stderr
fn stderr() -> writer
stdin
fn stdin() -> reader
stdout
fn stdout() -> writer
str_reader
fn str_reader(s: str) -> reader
u64_from_be_bytes
fn u64_from_be_bytes(data: ~[u8], start: uint, size: uint) -> u64
u64_to_be_bytes
fn u64_to_be_bytes<T>(n: u64, size: uint, f: fn(v: & [u8]) -> T) -> T
u64_to_le_bytes
fn u64_to_le_bytes<T>(n: u64, size: uint, f: fn(v: & [u8]) -> T) -> T
with_buf_writer
fn with_buf_writer(f: fn(writer)) -> ~[u8]
with_bytes_reader
fn with_bytes_reader<t>(bytes: ~[u8], f: fn(reader) -> t) -> t
with_bytes_reader_between
fn with_bytes_reader_between<t>(bytes: ~[u8], start: uint, end: uint,
f: fn(reader) -> t) -> t
with_str_reader
fn with_str_reader<T>(s: str, f: fn(reader) -> T) -> T
with_str_writer
fn with_str_writer(f: fn(writer)) -> str