Struct methods
garritfra opened this issue · 1 comments
garritfra commented
Assuming there is a Foo
struct, this would be the method implementation for "some_method":
impl Foo.some_method(x: int) {
self.bar = x
}
To call this method, a familiar syntax is used
fn main() {
let some_foo = new Foo {
bar: 5
}
some_foo.some_method(10)
}
garritfra commented
Note: syntax has been adjusted. See documentation.