Determine if two shared boxes point to the same object
Arguments:
a:@Tb:@T
Returns bool
Utilities for manipulating the char type
Indicates whether a character is in lower case, defined in terms of the Unicode General Category 'Ll'.
Arguments:
c:char
Returns bool
Indicates whether a character is in upper case, defined in terms of the Unicode General Category 'Lu'.
Arguments:
c:char
Returns bool
Indicates whether a character is whitespace, defined in terms of the Unicode General Categories 'Zs', 'Zl', 'Zp' additional 'Cc'-category control codes in the range [0x09, 0x0d]
Arguments:
c:char
Returns bool
Indicates whether a character is alphanumeric, defined in terms of the Unicode General Categories 'Nd', 'Nl', 'No' and the Derived Core Property 'Alphabetic'.
Arguments:
c:char
Returns bool
Convert a char to the corresponding digit. Safety note: This function fails if c is not a valid char
Arguments:
c:char
Returns u8
Convert a char to the corresponding digit. Returns none when character is not a valid hexadecimal digit.
Arguments:
c:char
Returns option::t<u8>
Convert a char to the corresponding lower case.
Arguments:
c:char
Returns char
Convert a char to the corresponding upper case.
Arguments:
c:char
Returns char
Compare two chars.
Arguments:
a:charb:char
Returns int
Classic Boolean logic reified as ADT
Negation/Inverse
Arguments:
v:t
Returns t
Conjunction
Arguments:
a:tb:t
Returns t
Disjunction
Arguments:
a:tb:t
Returns t
Exclusive or, i.e. or(and(a, not(b)), and(not(a), b))
Arguments:
a:tb:t
Returns t
Implication in the logic, i.e. from a follows b
Arguments:
a:tb:t
Returns t
true if truth values a and b are indistinguishable in the logic
Arguments:
a:tb:t
Returns bool
true if truth values a and b are distinguishable in the logic
Arguments:
a:tb:t
Returns bool
true if v represents truth in the logic
Arguments:
v:t
Returns bool
true if v represents falsehood in the logic
Arguments:
v:t
Returns bool
Parse logic value from s
Arguments:
s:str
Returns t
Convert v into a string
Arguments:
v:t
Returns str
Iterates over all truth values by passing them to blk in an unspecified order
Arguments:
blk:fn&(v: t)
converts truth value to an 8 bit byte
Arguments:
v:t
Returns u8
Definitions useful for C interop
Sets the process exit code
Sets the exit code returned by the process if all supervised tasks terminate successfully (without failing). If the current root task fails and is supervised by the scheduler then any user-specified exit status is ignored and the process exits with the default failure status.
Arguments:
code:int
Globally set the minimum size, in bytes, of a stack segment
Rust tasks have segmented stacks that are connected in a linked list allowing them to start very small and grow very large. In some situations this can result in poor performance. Calling this function will set the minimum size of all stack segments allocated in the future, for all tasks.
Arguments:
size:uint
Communication between tasks
Communication between tasks is facilitated by ports (in the receiving task), and channels (in the sending task). Any number of channels may feed into a single port. Ports and channels may only transmit values of unique types; that is, values that are statically guaranteed to be accessed by a single 'owner' at a time. Unique types include scalars, vectors, strings, and records, tags, tuples and unique boxes (~T) thereof. Most notably, shared boxes (@T) may not be transmitted across channels. Example: let p = comm::port(); task::spawn(comm::chan(p), fn (c: chan) { comm::send(c, "Hello, World"); }); io::println(comm::recv(p));
Sends data over a channel. The sent data is moved into the channel, whereupon the caller loses access to it.
Arguments:
ch:chan<T>data:T
Constructs a port.
Returns port<T>
Receive from a port. If no data is available on the port then the task will block until data becomes available.
Arguments:
p:port<T>
Returns T
Receive on a raw port pointer
Arguments:
p:*rustrt::rust_port
Returns T
Constructs a channel. The channel is bound to the port used to construct it.
Arguments:
p:port<T>
Returns chan<T>
Logging
Turns on logging to stdout globally
Turns off logging to stdout globally
Turns off the console unless the user has overridden the runtime environment's logging spec, e.g. by setting the RUST_LOG environment variable