2012-07-25 21:03:55 -05:00
|
|
|
// Core operators and kinds.
|
|
|
|
|
|
|
|
#[lang="const"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Const {
|
2012-07-25 21:03:55 -05:00
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="copy"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Copy {
|
2012-07-25 21:03:55 -05:00
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="send"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Send {
|
2012-07-25 21:03:55 -05:00
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="owned"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Owned {
|
2012-07-25 21:03:55 -05:00
|
|
|
// Empty.
|
|
|
|
}
|
|
|
|
|
2012-09-19 20:00:26 -05:00
|
|
|
#[lang="add"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Add<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn add(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="sub"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Sub<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn sub(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="mul"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Mul<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn mul(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="div"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Div<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn div(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="modulo"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Modulo<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn modulo(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
2012-07-25 21:03:55 -05:00
|
|
|
#[lang="neg"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Neg<Result> {
|
2012-07-27 21:32:42 -05:00
|
|
|
pure fn neg() -> Result;
|
2012-07-25 21:03:55 -05:00
|
|
|
}
|
|
|
|
|
2012-09-19 20:00:26 -05:00
|
|
|
#[lang="bitand"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait BitAnd<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn bitand(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="bitor"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait BitOr<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn bitor(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="bitxor"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait BitXor<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn bitxor(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="shl"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Shl<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn shl(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[lang="shr"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Shr<RHS,Result> {
|
2012-09-19 20:00:26 -05:00
|
|
|
pure fn shr(rhs: &RHS) -> Result;
|
|
|
|
}
|
|
|
|
|
2012-07-25 21:03:55 -05:00
|
|
|
#[lang="index"]
|
2012-09-28 14:30:11 -05:00
|
|
|
pub trait Index<Index,Result> {
|
2012-09-25 20:27:45 -05:00
|
|
|
pure fn index(+index: Index) -> Result;
|
2012-07-25 21:03:55 -05:00
|
|
|
}
|
|
|
|
|