Crate otter_api_tests[][src]

Re-exports

pub use imports::*;
pub use reqwest;

Modules

authproofs
base_misc
btree_map

A map based on a B-Tree.

btree_set

A set based on a B-Tree.

bundles
cleanup_notify
cmp

Functionality for ordering and comparison.

env

Inspection and manipulation of the process’s environment.

flexi_logger

A flexible and easy-to-use logger that writes logs to stderr and/or to files or other output streams.

fmt

Utilities for formatting and printing Strings.

fs

Filesystem manipulation operations.

geometry
hash_map

A hash map implemented with quadratic probing and SIMD lookup.

imports
io

Traits, helpers, and type definitions for core I/O functionality.

iter

Composable external iteration.

loaded_acl
mpsc

Multi-producer, single-consumer FIFO queue communication primitives.

nwtemplates
organise
progress
serde_json

Serde JSON

shapelib
str

Unicode string slices.

tempfile

Temporary files and directories.

thiserror

github

crates-io

docs-rs

thread

Native threads.

time

Temporal quantification.

unistd

Safe wrappers around functions found in libc “unistd.h” header

unixUnix

Platform-specific extensions to std for Unix platforms.

zcoord
zipfile

An ergonomic API for reading and writing ZIP files.

Macros

Debug

Derive macro generating an impl of the trait Debug.

Hash

Derive macro generating an impl of the trait Hash.

anyhow

Construct an ad-hoc error from a string or existing non-anyhow error value.

dbgc
debug

Logs a message at the debug level.

define_index_type

Generate the boilerplate for a newtyped index struct, for use with IndexVec.

delegate
deref_to_field
deref_to_field_mut
display_as_debug
display_consequential_impls
ensure

Return early with an error if a condition is not satisfied.

ensure_eq
env

Inspects an environment variable at compile time.

error

Logs a message at the error level.

error_from_losedetails
hformat
hformat_as_display
hwrite
if_chain

Macro for writing nested if let expressions.

if_let
impl_downcast

Adds downcasting support to traits that extend downcast::Downcast by defining forwarding methods to the corresponding implementations on std::any::Any in the standard library.

impl_for_slotmap_key
index_vec

A macro equivalent to the stdlib’s vec![], but producing an IndexVec.

info

Logs a message at the info level.

izip

Create an iterator running multiple iterators in lockstep.

json

Construct a serde_json::Value from a JSON literal.

lazy_static
log

The standard logging macro.

log_enabled

Determines if a message logged at the specified level in that module will be logged.

matches_doesnot
portmanteau_has
test
throw

Throw an error.

trace

Logs a message at the trace level.

trace_dbg
usual_wanted_tests
visible_slotmap_key
want
want_failed_internal
want_let
wantok
wants
warn

Logs a message at the warn level.

Structs

AbbrevPresentationLayout
AccessRecord

Record of acess for a player. Newtype prevents mutable access without invalidating old tokens and permissions check.

AccessTokenInfo
AccessTokenReport
AccountId
AccountName
AccountNotFound
AccountRecord
Accounts
AccountsGuard
Acl
AclEntry
Alphanumeric

Sample a u8, uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9.

ApiPieceOpArgs
Arc

A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.

ArrayVec

A vector with a fixed capacity.

AssetUrlToken
Authorisation
BTreeMap

A map based on a B-Tree.

BTreeSet

A set based on a B-Tree.

BadAssetUrlToken
BufReader

The BufReader<R> struct adds buffering to any reader.

BufWriter

Wraps a writer and buffers its output.

BundleMeta
Child

Representation of a running or exited child process.

CircleShape
Client
ClientId
ClientSequence
ColourSpec
Command

A process builder, providing fine-grained control over how a new process should be spawned.

CommittedLogEntry
CompassAngle

0 = unrotated, +ve is anticlockwise, units of 45deg

Condvar

A Condition Variable

CoordinateOverflow
Data
DataLoadPlayer
DebugReader
DenseSlotMap

Dense slot map, storage with stable unique keys.

DigestRead
DigestWrite
DirSubst
Duration

A Duration type to represent a span of time, typically used for system timeouts.

EffectiveACL
EnumMap

An enum mapping.

ExecuteGameChangeUpdates
ExitStatusError
ExtendedSubst
FaceId
FakeRngSpec
Fd
File

A reference to an open file on the filesystem.

FixedToken
FooParseError
Formatter

Configuration for formatting.

FrameReader
FrameWriter
G
GLOBAL
GPiece
GPieces
GPlayer
GameBeingDestroyed
GameOccults
GameSpec
GameState
Generation
GenericSimpleShape
Global
GoodItemName
HashMap

A hash map implemented with quadratic probing and SIMD lookup.

HashSet

A hash set implemented as a HashMap where the value is ().

Html
HtmlLit
HtmlStr
IOccults
IPiece
IPieceTraitObj
IPieces
IPlayer
IndexSlice

A slice that only accepts indices of a specific type. Note that the intended usage is as IndexSlice<I, [T]>.

IndexVec

A Vec that only accepts indices of a specific type.

Instance
Instance
InstanceAccessDetails
InstanceBundles
InstanceContainer
InstanceGuard
InstanceName
InstanceOuter
InstanceRef
InstanceWeakRef
Instant

A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.

InternalLogicError
IsHtmlFormatted
ItemEnquiryData
ItemSpec
JsonString
LibraryEnquiryData
LinksTable
LoadedAcl
LogEntry
LogSpecification

Immutable struct that defines which loglines are to be written, based on the module, the log level, and the text.

MgmtChannel
MgmtChannelForGame
ModifyingPieces
NamedTempFile

A named temporary file.

NascentOccultation
NonZeroUsize

An integer that is known not to equal zero.

Notch
Notches
OccId
OccultIlkData
OccultIlkId
OccultIlkName
OccultIlkOwningId

Does not impl Drop. Don’t just drop it.

OccultIlks
OccultView
Occultation
OccultationViews
OcculterRotationChecked
OldNew
Opts
OrderedFloat

A wrapper around floats providing implementations of Eq, Ord, and Hash.

OsStr

Borrowed reference to an OS string (see OsString).

OtterOutput
OtterPauseable
OtterPaused
OwnerOccultationView
PathBuf

An owned, mutable path (akin to String).

PerPlayerIdMap
PermSet
PhantomData

Zero-sized type used to mark things that “act like” they own a T.

PieceAliases
PieceId
PieceLabelLoaded
PieceOccult
PieceRenderInstructions
PieceSpecLoaded
PieceUpdate
PiecesSpec
PlayerAccessUnset
PlayerId
PlayerNotFound
PlayerRecord
PlayerUpdates
PlayerUpdatesBuildContext
PortmanteauMember
PosC
PosOffTableError
PrepareUpdatesBuffer
PreparedPieceImage
PreparedPieceState
PreparedPieceUpdateGeneral
PreparedUpdate
PreparedUpdateEntry_Image
PreparedUpdateEntry_Piece
PrivateCaller
ProgressInfo
RawToken
RawTokenVal
ReadFrame
RectC
RectShape
RefCell

A mutable memory location with dynamically checked borrow rules

RefMut

A wrapper type for a mutably borrowed value from a RefCell<T>.

Regex

A compiled regular expression for matching Unicode strings.

ResponseWriter
RngWrap
ServerConfig
ServerConfigSpec
SetupCore
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.

ShowUnocculted

Proof token.

SimpleCommon
SparseSecondaryMap

Sparse secondary map, associate data with previously stored elements in a slot map.

SpecDepth
StableIndexVecDeque

Double-ended queue with stable indices

StaticUserIter
StaticUserSetup
Stdio

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.

Subst
TablePermissionIter
TableSpec
Thunk
TimeSpec
TimedFd
TimedFdRead
TimedFdWrite
Timestamp
Timezone
ToRecalculate
TokenByEmail
TokenDeliveryError
TokenRegistry
TokenRevelationKey
TokenRevelationValue
TrackWantedTests
TransmitUpdate
TryFromIntError

The error type returned when a checked integral type conversion fails.

Uid

User identifier

Unauthorised
UniCase

Case Insensitive wrapper of strings.

UniformOccultationView
UniqueGenGen
UnixStream

A Unix stream socket.

UnsupportedColourSpec
UoDescription
Url

A parsed URL record.

UrlOnStdout
UrlSpec
VecDeque

A double-ended queue implemented with a growable ring buffer.

VisibleAngleTransform
VisiblePieceId
WantedTestsOpt
WholeServerConfig
Wrapping

Provides intentionally-wrapped arithmetic on T.

WriteFrame
ZCoord
ZLevel
ZipFile

A struct for reading a zip file

Enums

AccountScope
AccountsSaveError
AggregatedIE
ApiPieceOpError
AssetUrlKey
BigEndian

Defines big-endian serialization.

Cow

A clone-on-write smart pointer.

Either

The enum Either with variants Left and Right is a general purpose sum type with two cases.

EitherOrBoth

Value that either holds a single A or B, or both.

ErrorKind

A list specifying general categories of I/O error.

ErrorSignaledViaUpdate
Explode
Infallible

The error type for errors that can never happen.

InternalError
InvalidScopedName
LibraryLoadError
LinkKind
LittleEndian

Defines little-endian serialization.

Loop
MgmtChannelReadError
MgmtChannelWriteError
MgmtCommand
MgmtError
MgmtGameInstruction
MgmtGameResponse
MgmtGameUpdateMode
MgmtResponse
OccDisplacement
OccKA
OccKG
OccultationKindAlwaysOk
OccultationKindGeneral
OldNewIndex
OnlineError
Ordering

An Ordering is the result of a comparison between two values.

Outline
PathResolveContext
PathResolveMethod
PieceAngle
PieceMoveable
PieceOpError
PieceOpErrorPartiallyProcessed
PieceUpdateOp
PieceUpdateOps
PreparedUpdateEntry
PresentationLayout
PriOG
PriOccultedGeneral
ProgressUpdateMode
SVGProcessingError
SpecError
StaticUser
TablePermission
TablePlayerSpec
UoKind
Void

The empty type for cases which can’t occur.

WhatResponseToClientOp
ZipError

Error type for Zip

Constants

CLOCK_MONOTONIC
CLOCK_REALTIME
CONFIG
DAEMON_STARTUP_REPORT
DEFAULT_CONFIG_DIR
DEFAULT_CONFIG_LEAFNAME
DEFAULT_EDGE_WIDTH
DEFAULT_SENDMAIL_PROGRAM
DEFAULT_TABLE_COLOUR
DEFAULT_TABLE_SIZE
EXIT_DISASTER
EXIT_NOTFOUND
EXIT_SITUATION
EXIT_SPACE
EXIT_USAGE
HELD_SURROUND_COLOUR
INVISIBLE_EDGE_SENSITIVE
LOG_ENV_VAR
MS
NON_ALPHANUMERIC

Everything that is not an ASCII letter or digit.

SELECT_SCALE
SVG_SCALE
SYNCH_LOGENTRY_PREFIX
TABLE
URL

Traits

AccessId
AccountNameOrId
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 BufRead is a type of Reader which has an internal buffer, allowing it to perform extra ways of reading.

ById
ClampTable
CommandExt

Unix-specific extensions to the process::Command builder.

ConstantTimeEq

An Eq-like trait that produces a Choice instead of a bool.

Context

Provides the context method for Result.

Debug

? formatting.

DebugExt
Deref

Used for immutable dereferencing operations, like *v.

DerefMut

Used for mutable dereferencing operations, like in *v = 1;.

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 Digest trait specifies an interface common for digest functions.

Display

Format trait for an empty format, {}.

Downcast

Supports conversion to Any. Traits to be extended by impl_downcast! must extend Downcast.

DynCastExt

Simplifies the use of the DynCast trait by abstracting away the difference between different ways of storing trait objects.

EmptyType
Enum

Enum mapping type

EnumCount

A trait for capturing the number of variants in Enum. This trait can be autoderived by strum_macros.

EnumMessage

Associates additional pieces of information with an Enum. This can be autoimplemented by deriving EnumMessage and annotating your variants with `#[strum(message=“…”)].

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 strum_macros crate. Currently, the only string literals are supported in attributes, the other methods will be implemented as additional attribute types become stabilized.

Error

Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.

ExitStatusExt

Unix-specific extensions to process::ExitStatus and ExitStatusError.

FileExt

Extension trait for std::fs::File which provides allocation, duplication and locking methods.

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
IdForById
Index

Used for indexing operations (container[index]) in immutable contexts.

IndexMut

Used for indexing operations (container[index]) in mutable contexts.

IndexVecITExt
IntoEnumIterator

This trait designates that an Enum can be iterated over. It can be auto generated using strum_macros on your behalf.

IntoRawFd

A trait to express the ability to consume an object and acquire ownership of its raw file descriptor.

IoTryClone
IteratorExt
Itertools

An Iterator blanket implementation that provides extra adaptors and methods.

JsonLen
KeyDataExt

Extension trait for slotmap::KeyData, providing get_idx_version.

LocalFileExt
MetadataExt

OS-specific extensions to fs::Metadata.

MgmtBundleListExt
MgmtChannelExt
NumCast

An interface for casting between machine scalars.

OccultationViewDef
OccultedPieceTrait
Optionpiece_specsPieceLabelExt
OrdExt
OsStrExt

Platform-specific extensions to OsStr.

OtterArgsSpec
OutlineTrait
PieceSpec
PieceTrait
PieceXData
PieceXDataStateExt
PlayerAccessSpec
PosPromote
PropagateDid
Read

The Read trait allows for reading bytes from a source.

ReadBytesExt

Extends Read with methods for reading numbers. (For std::io.)

ReadExt
ResultExplodeExt
ResultGenDidExt
ResultTEExt
ResultVoidErrExt

Extensions to Result<Void, E>

ResultVoidExt

Extensions to Result<T, Void>

Rng

An automatically-implemented extension trait on RngCore providing high-level generic methods for sampling values and other convenience methods.

SeekExt
Serialize

A data structure that can be serialized into any data format supported by Serde.

SerializeTuple

Returned from Serializer::serialize_tuple.

Serializer

A data format that can serialize any data structure supported by Serde.

SimplePieceSpec
SliceRandom

Extension trait on slices, providing random mutation and sampling methods.

SlotmapSparseSecondaryEntryExt
SplitAtDelim
StructOpt

A struct that is converted from command line arguments.

Substitutor
TimedFdReadWrite
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.

TryInto

An attempted conversion that consumes self, which may or may not be expensive.

TupleOfLinkKindRefstrExt
VecPieceIdPieceUpdateOpsExt
VecTExt
Write

A trait for objects which are byte-oriented sinks.

WriteBytesExt

Extends Write with methods for writing numbers. (For std::io.)

_

A trait for writing or formatting into Unicode-accepting buffers or streams.

_

This trait defines a number of combinator-style methods for use with bool values.

_

Key used to access stored values in a slot map.

_
nixErrorExt

Functions

client_periodic_expiry
clock_gettime

Get the time of the specified clock, (see clock_gettime(2)).

config
consistency_check
create_occultation
dbgc_helper
default
exit

Terminates the current process with the specified exit code.

fork_something_which_prints
game_flush_task
games_lock
internal_error_bydebug
internal_logic_error
keydata_extract

Underlying extraction function. Fails rather than panicing.

load_accounts
load_games
log_config
log_did_to_piece
log_did_to_piece_whoby
logs_periodic_expiry
lookup_token
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.

piece_pri

None => do not render at all

player_dasharray
player_num_dasharray
portmanteau_main
prepare_game
prepare_gameserver
prepare_tmpdir
process_all_players_for_account
raw_angle_transform
recalculate_occultation_piece
record_token
reinvoke_via_bwrap
remove_occultation
repeat_with

Creates a new iterator that repeats elements of type A endlessly by applying the provided closure, the repeater, F: FnMut() -> A.

savefilename
setup_core
sleep

Puts the current thread to sleep for at least the specified amount of time.

slotkey_parse
slotkey_write
space_rect_attrs
space_table_attrs
svg_circle_path
svg_rectangle_path
svg_rescale_path
synch_logentry
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. thread_rng().gen::<i32>(), or cached locally, e.g. let mut rng = thread_rng();. Invoked by the Default trait, making ThreadRng::default() equivalent.

timestring_abbreviate
toml_merge
unreachable

A safe version of intrinsincs::unreachable.

utf8_percent_encode

Percent-encode the UTF-8 encoding of the given string.

vpiece_decode
zip_eq

Iterate i and j in lock step.

Type Definitions

AE
APOE
AS
ActualIPieces
AuthorisationSuperuser
BundlesGuard
Colour
Coord
ESVU
EarlyArgPredicate
FaceColourSpecs
GPlayers
GamesGuard
GamesTable
IE
JsV
MC
MC
ME
MGI
MGR
MR
MgmtBundleList
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.

NotchNumber
OE
OccK
OccultationKind
POE
POEPP
PUE
PUE_P
PUFOS
PUM
PUO
PUOs
ParseError

A type alias for Infallible.

PieceSpecLoadedOccultable
PieceUpdateFromOpSimple
PieceUpdateOps_PerPlayer
PieceUpdateResult
PieceXDataState
PlayerUpdatesLog
Pos
PreparedPieceUpdate
PriOcculted
RawAcl
RawClientSequence
RawFaceId
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
SimpleShape
SomeUnpreparedUpdates
SpE
StartupError
SvgAttrs
SvgData
SvgE
TimedFdReader
TimedFdWriter
TokenTable
UnpreparedUpdates
UoKey
UpdateFromOpComplex
VisiblePieceAngle
WRC

Attribute Macros

dyn_upcast
enum_dispatch

Annotating a trait or enum definition with an #[enum_dispatch] attribute will register it with the enum_dispatch library, allowing it to be used to generate impl blocks elsewhere.

ext

See crate docs for more info.

throws

Derive Macros

Deserialize
DeserializeFromStr

Deserialize value by using it’s FromStr implementation

Enum

Procedural derive generating enum_map::Enum implementation.

EnumCount

Add a constant usize equal to the number of variants.

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 num_traits::FromPrimitive for simple enums and newtypes.

IntoStaticStr

Implements From<MyEnum> for &'static str on an enum.

Serialize
SerializeDisplay

Serialize value by using it’s Display implementation

StructOpt

Generates the StructOpt impl.

ToPrimitive

Derives num_traits::ToPrimitive for simple enums and newtypes.