An error which can be returned when parsing an IP address or a socket address.
An iterator over
Path
and its ancestors.
A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically
Reference Counted’.
An iterator over the arguments of a process, yielding a
String
value for
each argument.
An iterator over the arguments of a process, yielding an
OsString
value
for each argument.
This structure represents a safely precompiled version of a format string
and its arguments. This cannot be generated at runtime because it cannot
safely be done, so no constructors are given and the fields are private
to prevent modification.
A simple wrapper around a type to assert that it is unwind safe.
An ordered map based on a
B-Tree.
An ordered set based on a B-Tree.
A barrier enables multiple threads to synchronize the beginning
of some computation.
A priority queue implemented with a binary heap.
A pointer type that uniquely owns a heap allocation of type T
.
The BufReader<R>
struct adds buffering to any reader.
Wraps a writer and buffers its output.
Thread factory, which can be used in order to configure the properties of
a new thread.
Representation of a borrowed C string.
A type representing an owned, C-compatible, nul-terminated string with no nul bytes in the
middle.
A mutable memory location.
An iterator over the
char
s of a string slice, and their positions.
The error type returned when a conversion from
u32
to
char
fails.
An iterator over the
char
s of a string slice.
Representation of a running or exited child process.
A handle to a child process’s stderr.
A handle to a child process’s standard input (stdin).
A handle to a child process’s standard output (stdout).
An iterator over slice in (non-overlapping) chunks separated by a predicate.
An iterator over slice in (non-overlapping) mutable chunks separated
by a predicate.
An iterator over a slice in (non-overlapping) chunks (chunk_size
elements at a
time), starting at the beginning of the slice.
An iterator over a slice in (non-overlapping) chunks (chunk_size
elements at a
time), starting at the beginning of the slice.
An iterator over a slice in (non-overlapping) mutable chunks (chunk_size
elements at a time), starting at the beginning of the slice.
An iterator over a slice in (non-overlapping) mutable chunks (chunk_size
elements at a time), starting at the beginning of the slice.
An iterator that clones the elements of an underlying iterator.
A process builder, providing fine-grained control
over how a new process should be spawned.
An iterator over the command arguments.
An iterator over the command environment variables.
A Condition Variable
The context of an asynchronous task.
An iterator that copies the elements of an underlying iterator.
A
Cursor
wraps an in-memory buffer and provides it with a
Seek
implementation.
An iterator that repeats endlessly.
An iterator that decodes UTF-16 encoded code points from an iterator of u16
s.
An error that can be returned when decoding UTF-16 code points.
A builder used to create directories in various manners.
Entries returned by the
ReadDir
iterator.
Opaque type representing the discriminant of an enum.
A Duration
type to represent a span of time, typically used for system
timeouts.
An iterator of
u16
over the string encoded as UTF-16.
An iterator that yields the current count and the element during iteration.
An iterator over the escaped version of a byte slice.
This type represents the status code the current process can return
to its parent under normal termination.
Describes the result of a process after it has terminated.
An object providing access to an open file on the filesystem.
Representation of the various timestamps on a file.
A structure representing a type of file with accessors for each file type.
It is returned by
Metadata::file_type
method.
An iterator that filters the elements of iter
with predicate
.
An iterator that uses f
to both filter and map elements from iter
.
An iterator that maps each element to an iterator, and yields the elements
of the produced iterators.
An iterator that flattens one level of nesting in an iterator of things
that can be turned into iterators.
Configuration for formatting.
An error indicating that no nul byte was present.
An error indicating that a nul byte was not in the expected position.
A possible error value when converting a String
from a UTF-8 byte vector.
A possible error value when converting a String
from a UTF-16 byte slice.
An error indicating that a nul byte was not in the expected position.
An iterator that yields None
forever after the underlying iterator
yields None
once.
A
hash map implemented with quadratic probing and SIMD lookup.
A
hash set implemented as a
HashMap
where the value is
()
.
An iterator that calls a function with a reference to each element before
yielding it.
A measurement of a monotonically nondecreasing clock.
Opaque and useful only with
Duration
.
An error returned by
BufWriter::into_inner
which combines an error that
happened while writing out the buffer, and the buffered writer object
which may be used to recover from the condition.
An error indicating invalid UTF-8 when converting a
CString
into a
String
.
A buffer type used with Write::write_vectored
.
A buffer type used with Read::read_vectored
.
An IPv4 address.
An IPv6 address.
An owned permission to join on a thread (block on its termination).
The error type for operations on the
PATH
variable. Possibly returned from
env::join_paths()
.
A value which is initialized on the first access.
A value which is initialized on the first access.
Wraps a writer and buffers output to it, flushing whenever a newline
(0x0a
, '\n'
) is detected.
A doubly-linked list with owned nodes.
A thread local storage (TLS) key which owns its contents.
A struct containing information about the location of a panic.
A wrapper to inhibit the compiler from automatically calling T
’s
destructor. This wrapper is 0-cost.
An iterator that maps the values of iter
with f
.
An iterator that only accepts elements while predicate
returns Some(_)
.
Metadata information about a file.
A mutual exclusion primitive useful for protecting shared data
An RAII implementation of a “scoped lock” of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.
A value that is known not to equal zero.
An error indicating that an interior nul byte was found.
A cell which can nominally be written to only once.
A synchronization primitive which can nominally be written to only once.
An iterator that yields a single element of type A
by
applying the provided closure F: FnOnce() -> A
.
Options and flags which can be used to configure how a file is opened.
Borrowed reference to an OS string (see
OsString
).
A type that can represent owned, mutable platform-native strings, but is
cheaply inter-convertible with Rust strings.
The output of a finished process.
A struct providing information about a panic.
An error returned when parsing a
bool
using
from_str
fails
An error which can be returned when parsing a char.
An error which can be returned when parsing a float.
An error which can be returned when parsing an integer.
A slice of a path (akin to
str
).
An owned, mutable path (akin to
String
).
An iterator with a peek()
that returns an optional reference to the next
element.
Creates a future which never resolves, representing a computation that never
finishes.
Representation of the various permissions on a file.
A pointer which pins its pointee in place.
A type of error which can be returned whenever a lock is acquired.
A Future that wraps a function returning
Poll
.
A structure wrapping a Windows path prefix as well as its unparsed string
representation.
An iterator over a slice in (non-overlapping) chunks (chunk_size
elements at a
time), starting at the end of the slice.
An iterator over a slice in (non-overlapping) chunks (chunk_size
elements at a
time), starting at the end of the slice.
An iterator over a slice in (non-overlapping) mutable chunks (chunk_size
elements at a time), starting at the end of the slice.
An iterator over a slice in (non-overlapping) mutable chunks (chunk_size
elements at a time), starting at the end of the slice.
An iterator over the subslices of the vector which are separated
by elements that match pred
, starting from the end of the slice.
An iterator over subslices separated by elements that match a
predicate function, limited to a given number of splits, starting
from the end of the slice.
RandomState
is the default state for
HashMap
types.
A (half-open) range bounded inclusively below and exclusively above
(start..end
).
A range only bounded inclusively below (start..
).
An unbounded range (..
).
A range bounded inclusively below and above (start..=end
).
A range only bounded exclusively above (..end
).
A range only bounded inclusively above (..=end
).
A
RawWaker
allows the implementor of a task executor to create a
Waker
or a
LocalWaker
which provides customized wakeup behavior.
A virtual function pointer table (vtable) that specifies the behavior
of a
RawWaker
.
A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference
Counted’.
Iterator over the entries in a directory.
A future that is immediately ready with a value.
Wraps a borrowed reference to a value in a RefCell
box.
A wrapper type for an immutably borrowed value from a RefCell<T>
.
A mutable memory location with dynamically checked borrow rules
A wrapper type for a mutably borrowed value from a RefCell<T>
.
An iterator that repeats an element an exact number of times.
An iterator that repeats elements of type A
endlessly by
applying the provided closure F: FnMut() -> A
.
A double-ended iterator with the direction inverted.
A helper struct for reverse ordering.
A reader-writer lock
RAII structure used to release the shared read access of a lock when
dropped.
RAII structure used to release the exclusive write access of a lock when
dropped.
Provides intentionally-saturating arithmetic on T
.
An iterator to maintain state while iterating another iterator.
A scope to spawn scoped threads in.
An owned permission to join on a scoped thread (block on its termination).
A writer which will move data into the void.
An implementation of SipHash 2-4.
An iterator that skips over n
elements of iter
.
An iterator that rejects elements while predicate
returns true
.
An IPv4 socket address.
An IPv6 socket address.
A splicing iterator for Vec
.
An iterator over the non-ASCII-whitespace substrings of a string,
separated by any amount of ASCII whitespace.
An iterator over the mutable subslices of the vector which are separated
by elements that match pred
. Unlike SplitMut
, it contains the matched
parts in the ends of the subslices.
An iterator over the mutable subslices of the vector which are separated
by elements that match pred
.
An iterator over subslices separated by elements that match a predicate
function, limited to a given number of splits.
An iterator that splits an environment variable into paths according to
platform-specific conventions.
An iterator over the non-whitespace substrings of a string,
separated by any amount of whitespace.
A handle to the standard error stream of a process.
A locked reference to the
Stderr
handle.
A handle to the standard input stream of a process.
A locked reference to the
Stdin
handle.
Describes what to do with a standard I/O stream for a child process when
passed to the
stdin
,
stdout
, and
stderr
methods of
Command
.
A handle to the global standard output stream of the current process.
A locked reference to the
Stdout
handle.
An iterator for stepping iterators by a custom amount.
A UTF-8–encoded, growable string.
A new iterator where each successive item is computed based on the preceding one.
A measurement of the system clock, useful for talking to
external entities like the file system or other processes.
An error returned from the duration_since
and elapsed
methods on
SystemTime
, used to learn how far in the opposite direction a system time
lies.
An iterator that only accepts elements while predicate
returns true
.
A TCP socket server, listening for connections.
A TCP stream between a local and a remote socket.
A handle to a thread.
A unique identifier for a running thread.
Returns an iterator that yields the lowercase equivalent of a char
.
Returns an iterator that yields the uppercase equivalent of a char
.
The error type returned when a checked char conversion fails.
An error which can be returned when converting a floating-point value of seconds
into a
Duration
.
The error type returned when a checked integral type conversion fails.
The error type returned when a conversion from a slice to an array fails.
The error type for try_reserve
methods.
A TypeId
represents a globally unique identifier for a type.
A UDP socket.
The core primitive for interior mutability in Rust.
An iterator used to decode a slice of mostly UTF-8 bytes to string slices
(
&str
) and byte slices (
&[u8]
).
Errors which can occur when attempting to interpret a sequence of
u8
as a string.
An iterator over a snapshot of the environment variables of this process.
An iterator over a snapshot of the environment variables of this process.
A contiguous growable array type, written as Vec<T>
, short for ‘vector’.
A double-ended queue implemented with a growable ring buffer.
A type indicating whether a timed wait on a condition variable returned
due to a time out or not.
A Waker
is a handle for waking up a task by notifying its executor that it
is ready to be run.
An iterator over overlapping subslices of length size
.
Provides intentionally-wrapped arithmetic on T
.
Error returned for the buffered data from BufWriter::into_parts
, when the underlying
writer has previously panicked. Contains the (possibly partly written) buffered data.
An iterator that iterates two other iterators simultaneously.
An iterator over a slice in (non-overlapping) mutable chunks (N
elements
at a time), starting at the beginning of the slice.
A windowed iterator over a slice in overlapping chunks (N
elements at a
time), starting at the beginning of the slice
A borrowed byte buffer which is incrementally filled and initialized.
A writeable view of the unfilled portion of a
BorrowedBuf
.
Like Iterator::by_ref
, but requiring Sized
so it can forward generics.
A Builder used to construct a Context
instance
with support for LocalWaker
.
The metadata for a Dyn = dyn SomeTrait
trait object type.
Exclusive
provides only mutable access, also referred to as exclusive
access to the underlying value. It provides no immutable, or shared
access to the underlying value.
Describes the result of a process after it has failed
An iterator which uses a closure to determine if an element should be removed.
Options for formatting.
An iterator adapter that places a separator between all elements.
An iterator adapter that places a separator between all elements.
A
LocalWaker
is analogous to a
Waker
, but it does not implement
Send
or
Sync
.
An iterator over the mapped windows of another iterator.
An RAII mutex guard returned by MutexGuard::map
, which can point to a
subfield of the protected data. When this structure is dropped (falls out
of scope), the lock will be unlocked.
RAII structure used to release the shared read access of a lock when
dropped, which can point to a subfield of the protected data.
RAII structure used to release the exclusive write access of a lock when
dropped, which can point to a subfield of the protected data.
A re-entrant mutual exclusion lock
An RAII implementation of a “scoped lock” of a re-entrant lock. When this
structure is dropped (falls out of scope), the lock will be unlocked.
ThinBox.
A wrapper for a va_list
x86_64 ABI implementation of a va_list
.
Implement FromResidual<Yeet<T>>
on your type to enable
do yeet expr
syntax in functions returning your type.
The addition operator +
.
The addition assignment operator +=
.
A trait to emulate dynamic typing.
Used to do a cheap mutable-to-mutable reference conversion.
Used to do a cheap reference-to-reference conversion.
Extension methods for ASCII-subset only operations.
An async-aware version of the
Fn
trait.
An async-aware version of the
FnMut
trait.
An async-aware version of the
FnOnce
trait.
b
formatting.
The bitwise AND operator &
.
The bitwise AND assignment operator &=
.
The bitwise OR operator |
.
The bitwise OR assignment operator |=
.
The bitwise XOR operator ^
.
The bitwise XOR assignment operator ^=
.
A trait for borrowing data.
A trait for mutably borrowing data.
A BufRead
is a type of Read
er which has an internal buffer, allowing it
to perform extra ways of reading.
A trait for creating instances of
Hasher
.
?
formatting.
Used for immutable dereferencing operations, like *v
.
Used for mutable dereferencing operations, like in *v = 1;
.
The division operator /
.
The division assignment operator /=
.
An iterator able to yield elements from both ends.
Custom code within the destructor.
An iterator that knows its exact length.
Extend a collection with the contents of an iterator.
The version of the call operator that takes an immutable receiver.
The version of the call operator that takes a mutable receiver.
The version of the call operator that takes a by-value receiver.
Used to do value-to-value conversions while consuming the input value. It is the reciprocal of
Into
.
Parse a value from a string
An iterator that always continues to yield None
when exhausted.
A future represents an asynchronous computation obtained by use of
async
.
A hashable type.
A trait for hashing an arbitrary stream of bytes.
Used for indexing operations (container[index]
) in immutable contexts.
Used for indexing operations (container[index]
) in mutable contexts.
A value-to-value conversion that consumes the input value. The
opposite of
From
.
Conversion into a Future
.
Trait to determine if a descriptor/handle refers to a terminal/tty.
A trait for dealing with iterators.
e
formatting.
x
formatting.
The multiplication operator *
.
The multiplication assignment operator *=
.
The unary negation operator -
.
The unary logical negation operator !
.
o
formatting.
Trait for comparisons using the equality operator.
p
formatting.
Trait to represent types that can be created by multiplying elements of an
iterator.
RangeBounds
is implemented by Rust’s built-in range types, produced
by range syntax like ..
, a..
, ..b
, ..=c
, d..e
, or f..=g
.
The Read
trait allows for reading bytes from a source.
A marker trait representing types where a shared reference is considered
unwind safe.
The remainder operator %
.
The remainder assignment operator %=
.
The Seek
trait provides a cursor which can be moved within a stream of
bytes.
The left shift operator <<
. Note that because this trait is implemented
for all integer types with multiple right-hand-side types, Rust’s type
checker has special handling for _ << _
, setting the result type for
integer operations to the type of the left-hand-side operand. This means
that though a << b
and a.shl(b)
are one and the same from an evaluation
standpoint, they are different when it comes to type inference.
The left shift assignment operator <<=
.
The right shift operator >>
. Note that because this trait is implemented
for all integer types with multiple right-hand-side types, Rust’s type
checker has special handling for _ >> _
, setting the result type for
integer operations to the type of the left-hand-side operand. This means
that though a >> b
and a.shr(b)
are one and the same from an evaluation
standpoint, they are different when it comes to type inference.
The right shift assignment operator >>=
.
A helper trait used for indexing operations.
The subtraction operator -
.
The subtraction assignment operator -=
.
Trait to represent types that can be created by summing up an iterator.
A trait for implementing arbitrary return types in the main
function.
A generalization of Clone
to borrowed data.
A trait for objects which can be converted or resolved to one or more
SocketAddr
values.
A trait for converting a value to a String
.
Simple and safe type conversions that may fail in a controlled
way under some circumstances. It is the reciprocal of
TryInto
.
An attempted conversion that consumes self
, which may or may not be
expensive.
A marker trait which represents “panic safe” types in Rust.
E
formatting.
X
formatting.
The implementation of waking a task on an executor.
Custom code within the asynchronous destructor.
Trait that indicates that this is a pointer or a wrapper for one,
where unsizing can be performed on the pointee.
The trait implemented by builtin coroutine types.
Perma-unstable marker trait. Indicates that the type has a well-behaved
Deref
(and, if applicable,
DerefMut
) implementation. This is relied on for soundness
of deref patterns.
DispatchFromDyn
is used in the implementation of dyn-compatibility checks (specifically
allowing arbitrary self types), to guarantee that a method’s receiver type can be dispatched on.
Supporting trait for inherent methods of f32
and f64
such as to_int_unchecked
.
Typically doesn’t need to be used directly.
Used to specify which residuals can be converted into which
crate::ops::Try
types.
An analogous trait to Wake
but used to construct a LocalWaker
.
OneSidedRange
is implemented for built-in range types that are unbounded
on one side. For example, a..
, ..b
and ..=c
implement OneSidedRange
,
but ..
, d..e
, and f..=g
do not.
Trait that indicates that this is a pointer or a wrapper for one, where
unsizing can be performed on the pointee when it is pinned.
Provides the pointer metadata type of any pointed-to type.
Indicates that a struct can be used as a method receiver.
That is, a type can use this type as a type of self
, like this:
Allows retrieving the canonical type implementing
Try
that has this type
as its residual and allows it to hold an
O
as its output.
Objects that have a notion of successor and predecessor operations.
Marks that Src
is transmutable into Self
.
An iterator that reports an accurate length using size_hint.
A type that upholds all invariants of
Step
.
The ?
operator and try {}
blocks.
A marker trait for primitive types which can be zero.
Terminates the process in an abnormal fashion.
Makes the path absolute without accessing the filesystem.
Compares the addresses of the two pointers for equality,
ignoring any metadata in fat pointers.
Returns the
ABI-required minimum alignment of a type in bytes.
Returns the
ABI-required minimum alignment of the type of the value that
val
points to in
bytes.
Returns the arguments that this program was started with (normally passed
via the command line).
Returns the arguments that this program was started with (normally passed
via the command line).
Makes a soundness promise to the compiler that cond
holds.
Returns an estimate of the default amount of parallelism a program should use.
An identity function that hints to the compiler to be maximally pessimistic about what
black_box
could do.
Returns the canonical, absolute form of a path with all intermediate
components normalized and symbolic links resolved.
Invokes a closure, capturing the cause of an unwinding panic if one occurs.
Copies count * size_of::<T>()
bytes from src
to dst
. The source
and destination must not overlap.
Creates a new, empty directory at the provided path
Recursively create a directory and all of its parent components if they
are missing.
Gets a handle to the thread that invokes it.
Returns the current working directory as a
PathBuf
.
Returns the full filesystem path of the current running executable.
Creates a new pointer that is dangling, but non-null and well-aligned.
Creates a new pointer that is dangling, but non-null and well-aligned.
Creates an iterator over the UTF-16 encoded code points in
iter
, returning
unpaired surrogates as
Err
s. Use
char::decode_utf16
instead.
Returns a value uniquely identifying the enum variant in v
.
Disposes of a value.
Executes the destructor (if any) of the pointed-to value.
Compares raw pointers for equality.
Returns an iterator that produces an escaped version of a u8
.
Returns Ok(true)
if the path points at an existing entity.
Terminates the current process with the specified exit code.
Compares the addresses of the two function pointers for equality.
Takes ownership and “forgets” about the value without running its destructor.
Takes an
Arguments
struct and returns the resulting formatted string.
Converts a boxed slice of bytes to a boxed string slice without checking
that the string contains valid UTF-8.
Converts a slice of bytes to a string slice.
Converts a mutable slice of bytes to a mutable string slice.
Converts a slice of bytes to a string slice without checking
that the string contains valid UTF-8.
Converts a slice of bytes to a string slice without checking
that the string contains valid UTF-8; mutable version.
Creates a new hard link on the filesystem.
Hash a raw pointer.
Returns the path of the current user’s home directory if known.
Returns the OS-assigned process identifier associated with this process.
The identity function.
Determines whether the character is one of the permitted path
separators for the current platform.
Joins a collection of
Path
s appropriately for the
PATH
environment variable.
Compares and returns the maximum of two values.
Returns the maximum of two values with respect to the specified comparison function.
Returns the element that gives the maximum value from the specified function.
Compares and returns the minimum of two values.
Returns the
ABI-required minimum alignment of a type in bytes.
Returns the
ABI-required minimum alignment of the type of the value that
val
points to in
bytes.
Returns the minimum of two values with respect to the specified comparison function.
Returns the element that gives the minimum value from the specified function.
Returns true
if dropping values of type T
matters.
Creates a null raw pointer.
Creates a null mutable raw pointer.
Creates an iterator that yields an element exactly once.
Creates an iterator that lazily generates a value exactly once by invoking
the provided closure.
Panics the current thread with the given message as the panic payload.
Determines whether the current thread is unwinding because of panic.
Blocks unless or until the current thread’s token is made available.
Blocks unless or until the current thread’s token is made available or
the specified duration has been reached (may wake spuriously).
Creates a future which never resolves, representing a computation that never
finishes.
Creates a future that wraps a function returning
Poll
.
Returns an iterator over the entries within a directory.
Reads a symbolic link, returning the file that the link points to.
Reads the value from src
without moving it. This leaves the
memory in src
unchanged.
Performs a volatile read of the value from src
without moving it. This
leaves the memory in src
unchanged.
Creates a future that is immediately ready with a value.
Removes an empty directory.
Removes a directory at this path, after removing all its contents. Use
carefully!
Removes a file from the filesystem.
Removes an environment variable from the environment of the currently running process.
Renames a file or directory to a new name, replacing the original file if
to
already exists.
Creates a new iterator that repeats a single element a given number of times.
Creates a new iterator that repeats elements of type A
endlessly by
applying the provided closure, the repeater, F: FnMut() -> A
.
Triggers a panic without invoking the panic hook.
Creates a scope for spawning scoped threads.
Changes the current working directory to the specified path.
Registers a custom panic hook, replacing the previously registered hook.
Changes the permissions found on a file or a directory.
Sets the environment variable key
to the value value
for the currently running
process.
Creates an instance of a writer which will successfully consume all data.
Returns the size of a type in bytes.
Returns the size of the pointed-to value in bytes.
Puts the current thread to sleep for at least the specified amount of time.
Forms a raw slice from a pointer and a length.
Forms a raw mutable slice from a pointer and a length.
Creates a new symbolic link on the filesystem.
Spawns a new thread, returning a
JoinHandle
for it.
Emits a machine instruction to signal the processor that it is running in
a busy-wait spin-loop (“spin lock”).
Parses input according to platform conventions for the PATH
environment variable.
Constructs a new handle to the standard error of the current process.
Constructs a new handle to the standard input of the current process.
Constructs a new handle to the standard output of the current process.
Creates a new iterator where each successive item is computed based on the preceding one.
Swaps count * size_of::<T>()
bytes between the two regions of memory
beginning at x
and y
. The two regions must not overlap.
Queries the metadata about a file without following symlinks.
Replaces dest
with the default value of T
, returning the previous dest
value.
Unregisters the current panic hook and returns it, registering the default hook
in its place.
Returns the path of a temporary directory.
Reinterprets the bits of a value of one type as another type.
Interprets src
as having type &Dst
, and then reads src
without moving
the contained value.
Returns the name of a type as a string slice.
Returns the type name of the pointed-to value as a string slice.
Bypasses Rust’s normal memory-initialization checks by pretending to
produce a value of type T
, while doing nothing at all.
Informs the compiler that the site which is calling this function is not
reachable, possibly enabling further optimizations.
Fetches the environment variable key
from the current process.
Fetches the environment variable
key
from the current process, returning
None
if the variable isn’t set or if there is another error.
Returns an iterator of (variable, value) pairs of strings, for all the
environment variables of the current process.
Returns an iterator of (variable, value) pairs of OS strings, for all the
environment variables of the current process.
Converts an address back to a pointer, picking up some previously ‘exposed’
provenance.
Converts an address back to a mutable pointer, picking up some previously ‘exposed’
provenance.
Creates a pointer with the given address and no
provenance.
Creates a pointer with the given address and no
provenance.
Sets count * size_of::<T>()
bytes of memory starting at dst
to
val
.
Overwrites a memory location with the given value without reading or
dropping the old value.
Performs a volatile write of a memory location with the given value without
reading or dropping the old value.
Cooperatively gives up a timeslice to the OS scheduler.
Returns the value of type T
represented by the all-zero byte-pattern.
Converts the arguments to iterators and zips them.
Invokes a closure, aborting if the closure unwinds.
Registers a function to run for every newly thread spawned.
Returns the
ABI-required minimum alignment of the type of the value that
val
points to in
bytes.
Makes all future panics abort directly without running the panic hook or unwinding.
Asynchronously drops a value by running AsyncDrop::async_drop
on a value and its fields recursively.
Creates the asynchronous destructor of the pointed-to value.
Converts the arguments to iterators and links them together, in a chain.
Like
forget
, but also accepts unsized values.
Creates a new iterator where each iteration calls the provided coroutine.
Forms a mutable slice from a pointer range.
Forms a slice from a pointer range.
Checks whether the standard library’s panic hook will capture and print a
backtrace.
Compares and sorts two values, returning minimum and maximum.
Returns minimum and maximum values with respect to the specified comparison function.
Returns minimum and maximum values with respect to the specified key function.
An identity function that causes an unused_must_use
warning to be
triggered if the given value is not used (returned, stored in a variable,
etc) by the caller.
Performs bounds checking of a range.
Configures whether the default panic hook will capture and display a
backtrace.
Returns the size of the pointed-to value in bytes.
Puts the current thread to sleep until the specified deadline has passed.
Creates an array
[T; N]
where each fallible array element
T
is returned by the
cb
call.
Unlike
from_fn
, where the element creation can’t fail, this version will return an error
if any element creation was unsuccessful.
Performs bounds checking of a range without panicking.
Atomic combination of
take_hook
and
set_hook
. Use this to replace the panic handler with
a new panic handler that does something and then executes the old handler.
Returns the number of variants in the enum type T
.