Module lrs

The lrs standard library.

Sub-modules

NameDescription
alloc

Memory allocation

atomic

Atomic integers

bool
bx

An allocated container.

clone

General object duplication.

cmp

Ordering comparisons

cty
dir

Operations for reading the entries in a directory and walking through a directory tree.

env

Process environment.

error

An error type with corresponding constants.

event
fd

Raw file descriptor handling.

file

File handling.

fmt

Object formatting

fs

Filesystem information and mounting.

getopt

A simple non-allocating argument parser.

group

Group handling.

hash
hashmap
inotify
into
intrinsics

Compiler intrinsics

io

I/O handling.

iter

Iterators

marker

Type markers

mem

Memory operations.

mem_map
msg_queue
netlink

Netlink sockets.

num

Number types

ops

Operator traits

option

Optional values

parse

Byte parsing.

pipe

Kernel pipes.

poll

File descriptor polling.

prelude

The prelude.

process

Process handling.

ptr

Pointer manipulation.

rc

Reference-counted objects.

repr

Representations of built-in types.

result

Results of operations.

ringbuf
share

Single-threaded interior mutability

signal

Signal handling.

slice

Slice manipulation.

socket

Socket handling.

string

String types.

swap
sync

Multi-threaded communication and synchronization.

sys

System management.

syscall

Syscall wrappers.

thread

Multi-threading

time

Time handling.

tty
undef
user

User handling.

util

Utility functions.

vec

Vector handling.

Macros

NameDescription
abort!

Aborts the process.

assert!

Asserts that a condition is satisfied. Aborts the process otherwise.

err!

Like print but write to stder.

errln!

Like println but write to stder.

format!

Formats a value into a ByteString.

matches!
print!

Prints a value to stdout.

Note that stdout always refers to the file descriptor 1.

println!

Prints a value to stdout.

Note that stdout always refers to the file descriptor 1.

try!

Unwraps the Ok branch of a Result and returns the error from the calling function otherwise.

vec!

Creates a vector out of the arguments.