Module otter::prelude [−][src]
Re-exports
pub use crate::imports::flexi_logger; | |
pub use crate::imports::thiserror; | |
pub use crate::imports::serde_json; | |
pub use std::fmt::Write as _; | |
pub use std::os::linux::fs::MetadataExt as _; | |
pub use boolinator::Boolinator as _; | |
pub use either::Left; | |
pub use either::Right; | |
pub use slotmap::Key as _; | |
pub use tempfile; | |
pub use crate::imports::zipfile; | |
pub use crate::dbgc; | |
pub use crate::deref_to_field; | |
pub use crate::deref_to_field_mut; | |
pub use crate::ensure_eq; | |
pub use crate::format_by_fmt_hex; | |
pub use crate::matches_doesnot; | |
pub use crate::trace_dbg; | |
pub use crate::want; | |
pub use crate::wantok; | |
pub use crate::wants; | |
pub use crate::want_let; | |
pub use crate::want_failed_internal; | |
pub use crate::accounts::loaded_acl; | |
pub use crate::accounts::loaded_acl::EffectiveACL; | |
pub use crate::accounts::loaded_acl::LoadedAcl; | |
pub use crate::accounts::loaded_acl::PermSet; | |
pub use crate::accounts::*; | |
pub use crate::authproofs; | |
pub use crate::authproofs::Authorisation; | |
pub use crate::authproofs::Unauthorised; | |
pub use crate::authproofs::AuthorisationSuperuser; | |
pub use crate::asseturl::*; | |
pub use crate::bundles; | |
pub use crate::bundles::InstanceBundles; | |
pub use crate::bundles::MgmtBundleListExt; | |
pub use crate::childio; | |
pub use crate::commands::AccessTokenInfo; | |
pub use crate::commands::AccessTokenReport; | |
pub use crate::commands::MgmtError; | |
pub use crate::commands::MgmtCommand; | |
pub use crate::commands::MgmtResponse; | |
pub use crate::commands::MgmtGameInstruction; | |
pub use crate::commands::MgmtGameResponse; | |
pub use crate::commands::MgmtBundleList; | |
pub use crate::commands::MgmtGameUpdateMode; | |
pub use crate::commands::ProgressUpdateMode; | |
pub use crate::config::*; | |
pub use crate::debugreader::DebugReader; | |
pub use crate::error::*; | |
pub use crate::fake_rng::*; | |
pub use crate::gamestate::*; | |
pub use crate::global::*; | |
pub use crate::hidden::*; | |
pub use crate::keydata::*; | |
pub use crate::nwtemplates; | |
pub use crate::mgmtchannel::*; | |
pub use crate::occultilks::*; | |
pub use crate::organise; | |
pub use crate::packetframe::FrameReader; | |
pub use crate::packetframe::FrameWriter; | |
pub use crate::packetframe::ReadFrame; | |
pub use crate::packetframe::WriteFrame; | |
pub use crate::packetframe::ReadExt; | |
pub use crate::packetframe::ResponseWriter; | |
pub use crate::pcaliases::*; | |
pub use crate::pcrender::*; | |
pub use crate::pieces::*; | |
pub use crate::progress; | |
pub use crate::progress::ProgressInfo; | |
pub use crate::progress::OriginatorExt as _; | |
pub use crate::shapelib; | |
pub use crate::shapelib::CircleShape; | |
pub use crate::shapelib::RectShape; | |
pub use crate::shapelib::ItemEnquiryData; | |
pub use crate::shapelib::LibraryEnquiryData; | |
pub use crate::shapelib::LibraryLoadError; | |
pub use crate::slotmap_slot_idx::*; | |
pub use crate::spec::*; | |
pub use crate::spec::piece_specs::FaceColourSpecs; | |
pub use crate::spec::piece_specs::SimpleCommon; | |
pub use crate::sse; | |
pub use crate::toml_de; | |
pub use crate::timedfd::*; | |
pub use crate::termprogress; | |
pub use crate::tz::*; | |
pub use crate::updates::*; | |
pub use crate::utils::*; | |
pub use crate::ui::*; | |
pub use OccultationKindGeneral as OccKG; | |
pub use OccultationKindAlwaysOk as OccKA; | |
pub use PriOccultedGeneral as PriOG; |
Modules
base_misc | |
btree_map | A map based on a B-Tree. |
btree_set | A set based on a B-Tree. |
cmp | Functionality for ordering and comparison. |
env | Inspection and manipulation of the process’s environment. |
fmt | Utilities for formatting and printing |
fs | Filesystem manipulation operations. |
geometry | |
hash_map | A hash map implemented with quadratic probing and SIMD lookup. |
io | Traits, helpers, and type definitions for core I/O functionality. |
iter | Composable external iteration. |
mem | Basic functions for dealing with memory. |
mpsc | Multi-producer, single-consumer FIFO queue communication primitives. |
str | Unicode string slices. |
thread | Native threads. |
time | Temporal quantification. |
unistd | Safe wrappers around functions found in libc “unistd.h” header |
unix | Unix Platform-specific extensions to |
void | Void |
zcoord |
Macros
Debug | Derive macro generating an impl of the trait |
Hash | Derive macro generating an impl of the trait |
anyhow | Construct an ad-hoc error from a string or existing non- |
debug | Logs a message at the debug level. |
define_index_type | Generate the boilerplate for a newtyped index struct, for use with
|
delegate | |
display_as_debug | |
ensure | Return early with an error if a condition is not satisfied. |
env | Inspects an environment variable at compile time. |
error | Logs a message at the error level. |
hformat | |
hformat_as_display | |
hwrite | |
if_chain | Macro for writing nested |
if_let | |
impl_downcast | Adds downcasting support to traits that extend |
index_vec | A macro equivalent to the stdlib’s |
info | Logs a message at the info level. |
izip | Create an iterator running multiple iterators in lockstep. |
lazy_static | |
log | The standard logging macro. |
log_enabled | Determines if a message logged at the specified level in that module will be logged. |
throw | Throw an error. |
trace | Logs a message at the trace level. |
warn | Logs a message at the warn level. |
Structs
Alphanumeric | Sample a |
Arc | A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’. |
ArrayVec | A vector with a fixed capacity. |
BTreeMap | A map based on a B-Tree. |
BTreeSet | A set based on a B-Tree. |
BufReader | The |
BufWriter | Wraps a writer and buffers its output. |
Child | Representation of a running or exited child process. |
Command | A process builder, providing fine-grained control over how a new process should be spawned. |
Condvar | A Condition Variable |
CoordinateOverflow | |
DenseSlotMap | Dense slot map, storage with stable unique keys. |
Duration | A |
EnumMap | An enum mapping. |
File | A reference to an open file on the filesystem. |
Formatter | Configuration for formatting. |
HashMap | A hash map implemented with quadratic probing and SIMD lookup. |
HashSet | A hash set implemented as a |
Html | |
HtmlLit | |
HtmlStr | |
IndexSlice | A slice that only accepts indices of a specific type. Note that the intended
usage is as |
IndexVec | A Vec that only accepts indices of a specific type. |
Instant | A measurement of a monotonically nondecreasing clock.
Opaque and useful only with |
IsHtmlFormatted | |
LogSpecification | Immutable struct that defines which loglines are to be written, based on the module, the log level, and the text. |
NamedTempFile | A named temporary file. |
NonZeroUsize | An integer that is known not to equal zero. |
OrderedFloat | A wrapper around floats providing implementations of |
OsStr | Borrowed reference to an OS string (see |
PathBuf | An owned, mutable path (akin to |
PhantomData | Zero-sized type used to mark things that “act like” they own a |
PosC | |
RectC | |
Regex | A compiled regular expression for matching Unicode strings. |
Sha512 | The SHA-512 hash algorithm with the SHA-512 initial hash value. |
Sha512Trunc256 | The SHA-512 hash algorithm with the SHA-512/256 initial hash value. The result is truncated to 256 bits. |
SparseSecondaryMap | Sparse secondary map, associate data with previously stored elements in a slot map. |
StableIndexVecDeque | Double-ended queue with stable indices |
Stdio | Describes what to do with a standard I/O stream for a child process when
passed to the |
TimeSpec | |
TryFromIntError | The error type returned when a checked integral type conversion fails. |
Uid | User identifier |
UniCase | Case Insensitive wrapper of strings. |
UnixStream | A Unix stream socket. |
Url | A parsed URL record. |
VecDeque | A double-ended queue implemented with a growable ring buffer. |
Wrapping | Provides intentionally-wrapped arithmetic on |
ZCoord | |
ZipFile | A struct for reading a zip file |
Enums
BigEndian | Defines big-endian serialization. |
Cow | A clone-on-write smart pointer. |
Either | The enum |
EitherOrBoth | Value that either holds a single A or B, or both. |
ErrorKind | A list specifying general categories of I/O error. |
Infallible | The error type for errors that can never happen. |
LittleEndian | Defines little-endian serialization. |
Ordering | An |
Void | The empty type for cases which can’t occur. |
ZipError | Error type for Zip |
Constants
CLOCK_MONOTONIC | |
CLOCK_REALTIME | |
MS | |
NON_ALPHANUMERIC | Everything that is not an ASCII letter or digit. |
SVG_SCALE |
Traits
Any | A trait to emulate dynamic typing. |
AsRawFd | A trait to extract the raw unix file descriptor from an underlying object. |
Borrow | A trait for borrowing data. |
Bounded | Numbers which have upper and lower bounds |
BufRead | A |
CommandExt | Unix-specific extensions to the |
ConstantTimeEq | An |
Context | Provides the |
Debug |
|
DebugExt | |
Deref | Used for immutable dereferencing operations, like |
DerefMut | Used for mutable dereferencing operations, like in |
Deserialize | A data structure that can be deserialized from any data format supported by Serde. |
DeserializeOwned | A data structure that can be deserialized without borrowing any data from the deserializer. |
Deserializer | A data format that can deserialize any data structure supported by Serde. |
Digest | The |
Display | Format trait for an empty format, |
Downcast | Supports conversion to |
DynCastExt | Simplifies the use of the |
Enum | Enum mapping type |
EnumCount | A trait for capturing the number of variants in Enum. This trait can be autoderived by
|
EnumMessage | Associates additional pieces of information with an Enum. This can be
autoimplemented by deriving |
EnumProperty | EnumProperty is a trait that makes it possible to store additional information
with enum variants. This trait is designed to be used with the macro of the same
name in the |
Error |
|
ExitStatusExt | Unix-specific extensions to |
FileExt | Extension trait for |
FromPrimitive | A generic trait for converting a number to a value. |
FromStr | Parse a value from a string |
Hash | A hashable type. |
Hasher | A trait for hashing an arbitrary stream of bytes. |
HtmlFormat | |
HtmlFormatRef | |
HtmlIteratorExt | |
Index | Used for indexing operations ( |
IndexMut | Used for indexing operations ( |
IntoEnumIterator | This trait designates that an |
IntoRawFd | A trait to express the ability to consume an object and acquire ownership of its raw file descriptor. |
Itertools | An |
MetadataExt | Unix-specific extensions to |
OpenOptionsExt | Unix-specific extensions to |
OsStrExt | Platform-specific extensions to |
PosPromote | |
Read | The |
ReadBytesExt | Extends |
ResultVoidErrExt | Extensions to |
ResultVoidExt | Extensions to |
Rng | An automatically-implemented extension trait on |
Serialize | A data structure that can be serialized into any data format supported by Serde. |
SerializeTuple | Returned from |
Serializer | A data format that can serialize any data structure supported by Serde. |
SliceRandom | Extension trait on slices, providing random mutation and sampling methods. |
ToPrimitive | A generic trait for converting a value to a number. |
TryFrom | 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 |
Write | A trait for objects which are byte-oriented sinks. |
WriteBytesExt | Extends |
Functions
clock_gettime | Get the time of the specified clock, (see clock_gettime(2)). |
default | |
exit | Terminates the current process with the specified exit code. |
max | Compares and returns the maximum of two values. |
min | Compares and returns the minimum of two values. |
percent_decode_str | Percent-decode the given string. |
raw_angle_transform | |
repeat_with | Creates a new iterator that repeats elements of type |
sleep | Puts the current thread to sleep for at least the specified amount of time. |
space_rect_attrs | |
space_table_attrs | |
thread_rng | Retrieve the lazily-initialized thread-local random number generator,
seeded by the system. Intended to be used in method chaining style,
e.g. |
timestring_abbreviate | |
unreachable | A safe version of |
utf8_percent_encode | Percent-encode the UTF-8 encoding of the given string. |
zip_eq | Iterate |
Type Definitions
AE | |
APOE | |
AS | |
Colour | |
Coord | |
ESVU | |
IE | |
MC | |
ME | |
MGI | |
MGR | |
MR | |
Mutex | A mutual exclusion primitive useful for protecting shared data |
MutexGuard | An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked. |
OE | |
OccK | |
POE | |
POEPP | |
PUE | |
PUE_P | |
PUFOS | |
PUM | |
PUO | |
PUOs | |
ParseError | A type alias for |
Pos | |
RawFd | Raw file descriptors. |
Rect | |
Region | |
RwLock | A reader-writer lock |
RwLockReadGuard | RAII structure used to release the shared read access of a lock when dropped. |
RwLockWriteGuard | RAII structure used to release the exclusive write access of a lock when dropped. |
SecondarySlotMap | |
SpE | |
SvgAttrs | |
SvgData | |
SvgE | |
WRC |
Attribute Macros
dyn_upcast | |
enum_dispatch | Annotating a trait or enum definition with an |
ext | See crate docs for more info. |
throws |
Derive Macros
Deserialize | |
DeserializeFromStr | Deserialize value by using it’s |
Enum | Procedural derive generating |
EnumCount | Add a constant |
EnumIter | Creates a new type that iterates of the variants of an enum. |
EnumMessage | Add a verbose message to an enum variant. |
EnumProperty | Add custom properties to enum variants. |
EnumString | Converts strings to enum variants based on their name. |
Error | |
FromPrimitive | Derives |
IntoStaticStr | Implements |
Serialize | |
SerializeDisplay | Serialize value by using it’s |
ToPrimitive | Derives |