Operations and constants for i8

Const bits

uint

Const bytes

uint

Const max_value

T

Const min_value

T

Implementation of num::Num for T

Method add

fn add(other: &T) -> T

Method sub

fn sub(other: &T) -> T

Method mul

fn mul(other: &T) -> T

Method div

fn div(other: &T) -> T

Method modulo

fn modulo(other: &T) -> T

Method neg

fn neg() -> T

Method to_int

fn to_int() -> int

Method from_int

fn from_int(n: int) -> T

Implementation of num::Zero for T

Method zero

fn zero() -> T

Implementation of num::One for T

Method one

fn one() -> T

Implementation of iter::Times for T

Method times

fn times(it: &fn() -> bool)

A convenience form for basic iteration. Given a variable x of any numeric type, the expression for x.times { /* anything */ } will execute the given function exactly x times. If we assume that x is an int, this is functionally equivalent to for int::range(0, x) |_i| { /* anything */ }.

Implementation of FromStr for T

Method from_str

fn from_str(s: &str) -> Option<T>

Function abs

fn abs(i: T) -> T

Computes the absolute value

Function add

fn add(x: T, y: T) -> T

Function compl

fn compl(i: T) -> T

Computes the bitwise complement

Function div

fn div(x: T, y: T) -> T

Function eq

fn eq(x: T, y: T) -> bool

Function from_str

fn from_str(s: &str) -> Option<T>

Parse a string to an int

Function ge

fn ge(x: T, y: T) -> bool

Function gt

fn gt(x: T, y: T) -> bool

Function is_negative

fn is_negative(x: T) -> bool

Function is_nonnegative

fn is_nonnegative(x: T) -> bool

Function is_nonpositive

fn is_nonpositive(x: T) -> bool

Function is_positive

fn is_positive(x: T) -> bool

Function le

fn le(x: T, y: T) -> bool

Function lt

fn lt(x: T, y: T) -> bool

Function max

fn max(x: T, y: T) -> T

Function min

fn min(x: T, y: T) -> T

Function mul

fn mul(x: T, y: T) -> T

Function ne

fn ne(x: T, y: T) -> bool

Function parse_bytes

fn parse_bytes(buf: &[u8], radix: uint) -> Option<T>

Parse a buffer of bytes

Arguments

Function range

fn range(lo: T, hi: T, it: &fn(T) -> bool)

Iterate over the range [lo..hi)

Function rem

fn rem(x: T, y: T) -> T

Function str

fn str(i: T) -> ~str

Convert to a string

Function sub

fn sub(x: T, y: T) -> T

Function to_str

fn to_str(n: T, radix: uint) -> ~str

Convert to a string in a given base

Function to_str_bytes

fn to_str_bytes<U>(n: T, radix: uint, f: &fn(v: &[u8]) -> U) -> U