Expand description
Make rust’s ecosystem more ergonomic, therefore more fun!
This crate is in alpha status, please see the github project for more details
https://github.com/rust-crates/ergo
Re-exports§
pub extern crate ergo_config;
pub extern crate ergo_fs;
pub extern crate ergo_std;
pub extern crate ergo_sync;
pub extern crate ergo_sys;
Modules§
- ch
- Module for working with channels. Rexport of
crossbeam_channel
- configure
- Configuration management.
- crossbeam_
channel - Multi-producer multi-consumer channels for message passing.
- ctrlc
- Cross platform handling of Ctrl-C signals.
- f32
- Constants for the
f32
single-precision floating point type. - f64
- Constants for the
f64
double-precision floating point type. - glob_
crate - Support for matching file paths against Unix shell style patterns.
- i8
Deprecation planned - Redundant constants module for the
i8
primitive type. - i16
Deprecation planned - Redundant constants module for the
i16
primitive type. - i64
Deprecation planned - Redundant constants module for the
i64
primitive type. - indexmap
IndexMap
is a hash table where the iteration order of the key-value pairs is independent of the hash values of the keys.- isize
Deprecation planned - Redundant constants module for the
isize
primitive type. - itertools
- Itertools — extra iterator adaptors, functions and macros.
- json
- Serde JSON
- lazy_
static - A macro for declaring lazily evaluated statics.
- maplit
- Macros for container literals with specific type.
- num_
cpus - A crate with utilities to determine the number of CPUs available on the current system.
- path_
abs - Ergonomic paths and files in rust.
- rand
- Utilities for random number generation
- regex
- This crate provides a library for parsing, compiling, and executing regular expressions. Its syntax is similar to Perl-style regular expressions, but lacks a few features like look around and backreferences. In exchange, all searches execute in linear time with respect to the size of the regular expression and search text.
- serde
- Serde
- serde_
derive - This crate provides Serde’s two derive macros.
- shellexpand
- Provides functions for performing shell-like expansions in strings.
- std_
prelude use std_prelude::*
so you can be ready to code!- str
- Utilities for the
str
primitive type. - tar
- A library for reading and writing TAR archives
- tempdir
- Temporary directories of files.
- toml
- A TOML-parsing library
- u8
Deprecation planned - Redundant constants module for the
u8
primitive type. - u16
Deprecation planned - Redundant constants module for the
u16
primitive type. - u64
Deprecation planned - Redundant constants module for the
u64
primitive type. - usize
Deprecation planned - Redundant constants module for the
usize
primitive type. - walkdir
- Crate
walkdir
provides an efficient and cross platform implementation of recursive directory traversal. Several options are exposed to control iteration, such as whether to follow symbolic links (default off), limit the maximum number of simultaneous open file descriptors and the ability to efficiently skip descending into directories. - yaml
- This crate is a Rust library for using the Serde serialization framework with data in YAML file format.
Macros§
- btreemap
- Create a BTreeMap from a list of key-value pairs
- btreeset
- Create a BTreeSet from a list of elements.
- ch
- Use with channels with ergonomic syntax and panic with helpful error messages when sending/receiving on a channel is invalid.
- ch_try
- Handle an expression that could be
Err
and send it over a channel if it is. - convert_
args - Macro that converts the keys or key-value pairs passed to another maplit
macro. The default conversion is to use the
Into
trait, if no custom conversion is passed. - forward_
to_ deserialize_ any - Helper macro when implementing the
Deserializer
part of a new data format for Serde. - hashmap
- Create a HashMap from a list of key-value pairs
- hashset
- Create a HashSet from a list of elements.
- indexmap
- Create an
IndexMap
from a list of key-value pairs - indexset
- Create an
IndexSet
from a list of values - lazy_
static - select_
loop - The static selection macro.
- take
- Take ownership of specific variables.
- use_
config_ from - use_
default_ config
Structs§
- Arc
- A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
- Atomic
Bool - A boolean type which can be safely shared between threads.
- Atomic
Isize - An integer type which can be safely shared between threads.
- Atomic
Usize - An integer type which can be safely shared between threads.
- BTree
Map - An ordered map based on a B-Tree.
- BufReader
- The
BufReader<R>
struct adds buffering to any reader. - BufWriter
- Wraps a writer and buffers its output.
- Deserialize
Error - Error when a
Serializer
orDeserializer
trait object fails. - Duration
- A
Duration
type to represent a span of time, typically used for system timeouts. - File
- An object providing access to an open file on the filesystem.
- File
Edit - A read/write file handle with
path()
attached and improved error messages. Contains methods and trait implements for both readable and writeable files. - File
Read - A read-only file handle with
path()
attached and improved error messages. Contains only the methods and trait implementations which are allowed by a read-only file. - File
Write - A write-only file handle with
path()
attached and improved error messages. Contains only the methods and trait implementations which are allowed by a write-only file. - Glob
Path Dirs - Returns an iterator of only
PathDirs
s, any files that matched the glob are ignored. - Glob
Path Files - Returns an iterator of only
PathFile
s, any directories that matched the glob are ignored. - Glob
Path Types - An iterator that yields
PathType
s from the filesystem that match a particular pattern. - HashMap
- A hash map implemented with quadratic probing and SIMD lookup.
- HashSet
- A hash set implemented as a
HashMap
where the value is()
. - Index
Map - A hash table where the iteration order of the key-value pairs is independent of the hash values of the keys.
- Index
Set - A hash set where the iteration order of the values is independent of their hash values.
- Into
Iter - An owning iterator that waits for messages until the channel is disconnected.
- Iter
- An iterator that waits for messages until the channel is disconnected.
- Mutex
- A mutual exclusion primitive useful for protecting shared data
- Open
Options - Options and flags which can be used to configure how a file is opened.
- OsString
- A type that can represent owned, mutable platform-native strings, but is cheaply inter-convertible with Rust strings.
- Path
- A slice of a path (akin to
str
). - PathAbs
- An absolute (not necessarily canonicalized) path that may or may not exist.
- PathArc
- A
PathBuf
that is atomically reference counted and reimplements thePathBuf
methods to display the action and path when there is an error. - PathBuf
- An owned, mutable path (akin to
String
). - PathDir
- A
PathAbs
that is guaranteed to be a directory, with associated methods. - Path
File - a
PathAbs
that was a file at the time of initialization, with associated methods. - PathTmp
- A
PathDir
that is automatically deleted when it goes out of scope. - Rc
- A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
- ReadDir
- Iterator over the entries in a directory.
- Receiver
- The receiving half of a channel.
- Recv
Error - An error returned from the
Receiver::recv
method. - Regex
- A compiled regular expression for matching Unicode strings.
- Select
- The dynamic selection interface.
- Select
Recv Error - An error returned from the
Select::recv
method. - Select
Send Error - An error returned from the
Select::send
method. - Send
Error - An error returned from the
Sender::send
method. - Sender
- The sending half of a channel.
- TryIter
- An iterator that receives messages until the channel is empty or disconnected.
- WalkDir
- A builder to create an iterator for recursively walking a directory.
- Walk
Error - An error produced by recursively walking a directory.
Enums§
- Atomic
Ordering - Atomic memory orderings
- Cow
- A clone-on-write smart pointer.
- Ordering
- An
Ordering
is the result of a comparison between two values. - Path
Type - An an enum containing either a file or a directory.
- Recv
Timeout Error - This enumeration is the list of possible errors that made
recv_timeout
unable to return data when called. This can occur with both bounded and unbounded channels. - Seek
From - Enumeration of possible methods to seek within an I/O object.
- Send
Timeout Error - This enumeration is the list of possible errors that made
send_timeout
unable to return data when called. This can occur with bounded channels only. - TryRecv
Error - This enumeration is the list of the possible reasons that
try_recv
could not return data when called. This can occur with both bounded and unbounded channels. - TrySend
Error - This enumeration is the list of the possible error outcomes for the
try_send
method.
Constants§
- ATOMIC_
USIZE_ INIT Deprecated - An
AtomicUsize
initialized to0
.
Traits§
- Ascii
Ext Deprecated - Extension methods for ASCII-subset only operations.
- Borrow
- A trait for borrowing data.
- BufRead
- A
BufRead
is a type ofRead
er which has an internal buffer, allowing it to perform extra ways of reading. - Configure
- A configuration struct which can be generated from the environment.
- Debug
?
formatting.- Deref
- Used for immutable dereferencing operations, like
*v
. - Deref
Mut - Used for mutable dereferencing operations, like in
*v = 1;
. - Deserialize
- A data structure that can be deserialized from any data format supported by Serde.
- Deserializer
- A data format that can deserialize any data structure supported by Serde.
- Equivalent
- Key equivalence trait.
- Finish
Handle - Convinience trait mimicking
std::thread::JoinHandle
with better ergonomics. - FmtWrite
- A trait for writing or formatting into Unicode-accepting buffers or streams.
- From
Iterator - Conversion from an
Iterator
. - FromStr
- Parse a value from a string
- Hash
- A hashable type.
- Hasher
- A trait for hashing an arbitrary stream of bytes.
- IoWrite
- A trait for objects which are byte-oriented sinks.
- Itertools
- The trait
Itertools
: extra iterator adaptors and methods for iterators. - Lazy
Static - Support trait for enabling a few common operation on lazy static values.
- Ord
- Trait for types that form a total order.
- Partial
Ord - Trait for types that form a partial order.
- Path
DirExt - Extension method on the
Path
type. - Path
Type Ext - Extended methods for
PathType
- Read
- The
Read
trait allows for reading bytes from a source. - Seek
- The
Seek
trait provides a cursor which can be moved within a stream of bytes. - Serialize
- A data structure that can be serialized into any data format supported by Serde.
- Serializer
- A data format that can serialize any data structure supported by Serde.
- __Deref
- Used for immutable dereferencing operations, like
*v
.
Functions§
- bounded
- Creates a new channel of bounded capacity, returning the sender/receiver halves.
- deep_
copy - Do a deep copy of a directory from one location to another.
- expand
- Performs both tilde and environment shell expansions in the default system context. This is
the same as
shellexpand::full
and is the “typical use case” for expanding strings. - glob
- Return an iterator that produces all the
PathType
s that match the given pattern, which may be absolute or relative to the current working directory. - glob_
with - The same as
glob
but with additional options. - initialize
- Takes a shared reference to a lazy static and initializes it if it has not been already.
- size_of
- Returns the size of a type in bytes.
- size_
of_ val - Returns the size of the pointed-to value in bytes.
- sleep
- Puts the current thread to sleep for at least the specified amount of time.
- sleep_
ms - Just sleep for a certain number of milliseconds.
- spawn
- Spawns a new thread, returning a
JoinHandle
for it. - unbounded
- Creates a new channel of unbounded capacity, returning the sender/receiver halves.
Type Aliases§
- Expand
Error - Renamed
shellexpand::LookupError
for better ergonomics. - Glob
Options - Renamed
glob::MatchOptions
- Glob
Pattern Error - Renamed
glob::PatternError
Derive Macros§
- Configure
- Debug
- Derive macro generating an impl of the trait
Debug
. - Deserialize
- Hash
- Derive macro generating an impl of the trait
Hash
. - Ord
- Derive macro generating an impl of the trait
Ord
. The behavior of this macro is described in detail here. - Partial
Ord - Derive macro generating an impl of the trait
PartialOrd
. The behavior of this macro is described in detail here. - Serialize