|
interface ExampleInterface {
|
|
fn method1();
|
|
fn method2(i32, i32);
|
|
fn method3(i32, i32) i32;
|
|
}
|
|
|
|
struct ExampleStruct {
|
|
i32 member,
|
|
}
|
|
|
|
impl ExampleStruct ExampleInterface {
|
|
fn method1() {}
|
|
|
|
fn method2(i32 arg1, i32 arg2) {}
|
|
|
|
fn method3(i32 arg1, i32 arg2) i32 { arg1 + arg2 }
|
|
}
|