pub trait SqlConnection<'self, S: SqlStatement> { fn new(uri: &str) -> ~Self; fn prepare(&self, query: &str) -> ~S<'self>; } pub trait SqlStatement { fn query(&self, params: &[@SqlType], blk: &fn(&SqlResult) -> Result) -> Result; fn update(&self, params: &[@SqlType]) -> Result; } pub trait SqlResult>: Container { fn iter(&self) -> I; } pub trait SqlRow { fn get(&self) -> Option; } pub enum SqlType { Int(int), Uint(uint), }