core::prelude
the names every file outside the library sees bare:
user code gets an implicit use core::prelude::*;
unless the file says #![no_implicit_nabi]. Each name appears once.
Variants are not here: a bare variant resolves from the expected type.
The OS Ext traits are here on their targets only: their methods need no
use there, and elsewhere the call says where the method exists.
Re-exports
bare::ffi::types::{ c_schar, c_uchar, c_short, c_ushort, c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong, c_size_t, c_ssize_t, c_ptrdiff_t, c_intptr_t, c_uintptr_t, c_wchar, c_float, c_double, c_void, }Source
pub use bare::ffi::types::{
c_schar, c_uchar, c_short, c_ushort, c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong,
c_size_t, c_ssize_t, c_ptrdiff_t, c_intptr_t, c_uintptr_t, c_wchar, c_float, c_double, c_void,
}c_scharCsigned char.c_ucharCunsigned char.c_shortCshort.c_ushortCunsigned short.c_intCint.c_uintCunsigned int.c_longClong: 32 bits on Windows and 32-bit targets, else 64.c_ulongCunsigned long: 32 bits on Windows and 32-bit targets, else 64.c_longlongClong long.c_ulonglongCunsigned long long.c_size_tCsize_t.c_ssize_tCssize_t.c_ptrdiff_tCptrdiff_t.c_intptr_tCintptr_t.c_uintptr_tCuintptr_t.c_wcharCwchar_t: a UTF-16 unit on Windows, unsigned on Linux on Arm.c_floatCfloat.c_doubleCdouble.c_voidC'svoid, only behind a pointer:CPtr<c_void>is avoid*.
core::channel::{Sender, Receiver}Source
pub use core::channel::{Sender, Receiver}core::channel::{channel, channel_bounded}Source
pub use core::channel::{channel, channel_bounded}channelAn unbounded channel.channel_boundedA channel holding at mostcapqueued values:sendblocks while it is full.
core::cmp::OrderingSource
pub use core::cmp::OrderingOrderingThe result of a three-way comparison.
core::cmp::{Eq, Ord, Hash}Source
pub use core::cmp::{Eq, Ord, Hash}core::collections::{List, Dict, Set, Deque, BinaryHeap, Slice, SliceMut, FrozenList, FrozenDict, FrozenSet}Source
pub use core::collections::{List, Dict, Set, Deque, BinaryHeap, Slice, SliceMut, FrozenList, FrozenDict, FrozenSet}ListA growable array; copies share one buffer.DictSbuilds the hashers (RandomState: the process key).SetSbuilds the hashers (RandomState: the process key).DequeA growable ring buffer with O(1) push and pop at both ends.BinaryHeapA priority queue:new()pops the greatest item first,by_ordering(cmp)the greatest bycmp.SliceA zero-copy view of a buffer: elementiisbuf[start + i * stride].SliceMutA writable view of a list's elements, like Rust's&mut [T]:s[i] = xwrites the list.FrozenListA list that never changes:Sync, so threads share one without a lock (aparclosure may capture it, astaticmay hold it, a hand-off leaves it shared).FrozenDictA dict that never changes:Sync, so threads share one without a lock.FrozenSetA set that never changes:Sync, so threads share one without a lock.
core::convert::{From, Into, TryFrom, TryInto}Source
pub use core::convert::{From, Into, TryFrom, TryInto}core::error::ErrorSource
pub use core::error::ErrorErrorEvery error type's surface.
core::error::ResultSource
pub use core::error::ResultResultA value or an error, kept as a value:Ok(T)orErr(E).
core::error::{ ParseError, ValueError, OverflowError, ConversionError, TypeError, StackOverflowError, OutOfMemoryError, InternalError, }Source
pub use core::error::{
ParseError, ValueError, OverflowError, ConversionError, TypeError, StackOverflowError,
OutOfMemoryError, InternalError,
}ParseErrorAstrthat is not a valid value of the requested type (thrown bystr::parse/FromStr).ValueErrorAn invalid argument value (FormatSpec::parse,hkdf::expand, ...).OverflowErrorA value out of a fixed-width type's range in a checked conversion (thrown bytry_from/try_into).ConversionErrorA failedTryFromconversion: the trait's defaultErrorfor impls that name no more specific one.TypeErrorA value of the wrong type.StackOverflowErrorFatal: the stack ran out.OutOfMemoryErrorFatal: an allocation failed.InternalErrorFatal: a compiler bug reached at run time.
core::fmt::{Debug, Display, RichDisplay}Source
pub use core::fmt::{Debug, Display, RichDisplay}DebugWhatf"{x:?}"writes.DisplayWhatf"{x}"writes.RichDisplayRenderings of a value a notebook front end shows (an image, a table, a formula):nabi jupytersends them for a cell whose value has them, anddisplay(x)sends them mid-cell.
core::fmt::{Formatter, FmtError}Source
pub use core::fmt::{Formatter, FmtError}FormatterWhere a value's text goes, with the spec it is written by: the runtime's growing text (nabi_fmt_*) and the spec packed in two words -flags: fill (bits 0..32), align, sign, type (a byte each from bit 32),#(bit 56),0(bit 57);counts: width, precision (32 bits each, all ones when absent).FmtErrorA failed write.
core::future::{Future, IntoFuture}Source
pub use core::future::{Future, IntoFuture}FutureAn asynchronous computation.IntoFutureWhatawaitaccepts besides aFuture.
core::io::{Read, Write, AsyncRead, AsyncWrite}Source
pub use core::io::{Read, Write, AsyncRead, AsyncWrite}ReadA source of bytes.WriteA sink of bytes.AsyncReadReadthat suspends the task instead of blocking the thread.AsyncWriteWritethat suspends the task.
core::iter::{Iterator, IntoIterator, FromIterator, TryIterator}Source
pub use core::iter::{Iterator, IntoIterator, FromIterator, TryIterator}IteratorA source of items, one pernextcall;noneends it.IntoIteratorA valueforcan walk:into_iterturns it into an iterator.FromIteratorA collection buildable from an iterator (collect).TryIteratorAn iterator whosenextcan fail: an item,noneat the end, or a thrownError.
core::marker::{Clone, Copy, Drop, Default, Send, Sync}Source
pub use core::marker::{Clone, Copy, Drop, Default, Send, Sync}CloneAn explicit duplicate:x.clone();#[derive(Clone)]clones every field.CopyBitwise copy is a correct duplicate.DropCleanup on release.DefaultA type's default value (0,false,'\0',"", empty collections);#[derive(Default)]defaults every field.SendSafe to move to another thread.SyncSafe to read through shared references from several threads.
core::num::bigfloat::FloatSource
pub use core::num::bigfloat::FloatFloatm * 2^e.
core::num::bigint::IntSource
pub use core::num::bigint::IntIntAn arbitrary-precision integer.
core::ops::{PartialEq, PartialOrd}Source
pub use core::ops::{PartialEq, PartialOrd}PartialEq==/!=: equality that may be partial (NaN is unequal to itself).PartialOrd<,>,<=,>=: an order that may be partial (NaN).
core::panic::{panic, assert, assert_eq, assert_ne, unreachable}Source
pub use core::panic::{panic, assert, assert_eq, assert_ne, unreachable}panicAbort withmsg, reporting the first caller outside a#[track_caller]chain.assertAbort unlesscondholds.assert_eqAbort unlessleft == right; the message shows both viaDebug.assert_neAbort ifleft == right; the message shows both viaDebug.unreachableAbort: code the program believed it could never reach ran.
core::print::{print, println, eprint, eprintln, dbg, display}Source
pub use core::print::{print, println, eprint, eprintln, dbg, display}printWritesvto stdout.printlnWritesvand a newline to stdout.eprintWritesvto stderr.eprintlnWritesvand a newline to stderr.dbgWritesvalue'sDebugform to stderr and returnsvalue(Rustdbg!).displayShowsxby itsRichDisplayrenderings now: in anabi jupyternotebook as the cell's output at this point (display_data), elsewhere as itstext/plainline (nothing without one).
core::range::{Range, RangeInclusive}Source
pub use core::range::{Range, RangeInclusive}Rangea..b: fromstartup to but not includingend.RangeInclusivea..=b: fromstartup to and includingend.
core::reflect::InspectSource
pub use core::reflect::InspectInspectField and method listing, opt-in through#[derive(Inspect)].
core::str::FromStrSource
pub use core::str::FromStrFromStrstr.parse::<T>()dispatch.
core::str::StrBufSource
pub use core::str::StrBufStrBufA growable UTF-8 buffer.
core::sync::{Mutex, RwLock, Atomic, Cell}Source
pub use core::sync::{Mutex, RwLock, Atomic, Cell}core::task::TaskSource
pub use core::task::TaskTaskA spawned task;awaitit for its result.
core::time::{Duration, Instant}Source
pub use core::time::{Duration, Instant}core::{ array, bench, channel, cmp, collections, convert, crypto, encoding, error, fmt, future, hint, index, io, iter, marker, num, ops, panic, par, print, range, reflect, str, stream, sync, task, time, tuple, }Source
pub use core::{
array, bench, channel, cmp, collections, convert, crypto, encoding, error, fmt, future,
hint, index, io, iter, marker, num, ops, panic, par, print, range, reflect, str, stream, sync,
task, time, tuple,
}arrayClone / Copy / Default / Debug / PartialEq / Eq / Hash for fixed arrays[T; N], element-wise, and PartialOrd / Ord, lexicographic; andArray<T, N>, the n-dimensional array.benchthe enginenabi benchdrives.channelmessage passing between threads.cmptotal equality, ordering and hashing.collectionsList / Dict / Set / Slice, Deque, BinaryHeap, SortedDict / SortedSet, and the frozen (read-only,Sync) List / Dict / Set.convertconversion traits and primitive impls.cryptoCryptographic algorithms: pure computation, no OS (randomness isstd::random).encodingbytes as text (RFC 4648):hexandbase64.errorResult<T, E>, an error kept as a value.fmtFormatter,Display/Debug,FormatSpecand the f-string lowering targets.futureFuture/Poll/Context/Waker/IntoFuture.hinthints the optimizer honors.indexIndexing + slicing traits.ioIoError, the byte-stream traitsRead,BufRead,Write,Seekand their async twins, the buffers,Cursor,copyand the standard streams.iterIterator + IntoIterator + FromIterator.markerMarker traits used by#[derive(..)]and other compiler-driven semantics.numthe primitive types' operator / comparison trait impls.opsOperator traits: the source of every operator token.panicthe compiler hookspanic_fn/oom_fn/unreachable_fn: print a message to stderr and exit 101.pardata-parallel helpers, on the process's task executor (core::task): from async code on the worker it runs on, from sync code with the caller as a guest worker.printprint/println/eprint/eprintln,dbganddisplay(the prelude names them, so they need nouse).rangeRange / RangeInclusive / RangeFrom / RangeTo / RangeToInclusive / RangeFull.reflectReflect/Inspect.strstrmethods and trait impls.streamStream/IntoStream/FromStream.syncconcurrency primitives.tasktasks on the work-stealing executor andblock_on;Duration/Instantarecore::time.timeDuration/Instant.tupleClone / Copy / Default / Debug / PartialEq / Eq / Hash for tuples of 1 to 12 elements, component-wise, and PartialOrd / Ord, lexicographic.
std::os::linux::net::TcpStreamExtSource
pub use std::os::linux::net::TcpStreamExtTcpStreamExtKernel-side copies into aTcpStream.
std::os::linux::process::ChildExtSource
pub use std::os::linux::process::ChildExtChildExtLinux-onlyChildaccess.
std::os::unix::fs::PermissionsExtSource
pub use std::os::unix::fs::PermissionsExtPermissionsExtThe Unix permission bits of aPermissions.
std::os::unix::process::{CommandExt, ExitStatusExt}Source
pub use std::os::unix::process::{CommandExt, ExitStatusExt}CommandExtUnix-onlyCommandsettings.ExitStatusExtHow a Unix child ended beyond its exit code.