mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
057617c6654bfd5a677112cd26141d0b9c137145
iface items and interface references in impl items.
The (temporary) syntax is
iface seq<T> {
fn len() -> uint;
fn iter(f: block(T));
}
// The 'blah<T>' can be left of to default the name of the
// impl to seq<T>. The 'of seq<T>' can be left off when
// not implementing a named interface.
impl blah<T> of seq<T> for [T] {
fn len() -> uint { vec::len(self) }
fn iter(f: block(T)) { for x in self { f(x); } }
}
This is a compiler and suite of associated libraries and documentation for the Rust programming language. See LICENSE.txt for terms of copyright and redistribution. See http://www.rust-lang.org for more information.
Description
Languages
Rust
95.7%
Shell
1%
C
0.9%
JavaScript
0.6%
Python
0.4%
Other
1.2%