Crate starfish_common

source ·

Re-exports§

Modules§

Macros§

  • Construct an ad-hoc error from a string or existing non-anyhow error value.
  • Return early with an error.
  • Convenience function for creating decimal numbers
  • Waits on multiple concurrent branches, returning when all branches complete.
  • Construct a serde_json::Value from a JSON literal.
  • Waits on multiple concurrent branches, returning when the first branch completes, cancelling the remaining branches.

Structs§

  • The Error type, a wrapper around a dynamic error type.
  • A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
  • DateDeprecated
    ISO 8601 calendar date with time zone.
  • ISO 8601 combined date and time with time zone.
  • Decimal represents a 128 bit representation of a fixed-precision decimal number. The finite set of values of type Decimal are of the form m / 10e, where m is an integer such that -296 < m < 296, and e is an integer between 0 and 28 inclusive.
  • A Duration type to represent a span of time, typically used for system timeouts.
  • The time zone with fixed offset, from UTC-23:59:59 to UTC+23:59:59.
  • A hash map implemented with quadratic probing and SIMD lookup.
  • A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
  • The local timescale.
  • An asynchronous Mutex-like type.
  • A handle to a held Mutex. The guard can be held across any .await point as it is Send.
  • ISO 8601 calendar date without timezone. Allows for every proleptic Gregorian date from Jan 1, 262145 BCE to Dec 31, 262143 CE. Also supports the conversion from ISO 8601 ordinal and week date.
  • ISO 8601 combined date and time without timezone.
  • ISO 8601 time without timezone. Allows for the nanosecond precision and optional leap second representation.
  • Receives values from the associated Sender.
  • An asynchronous reader-writer lock.
  • RAII structure used to release the shared read access of a lock when dropped.
  • Sends values to the associated Receiver.
  • A Duration type to represent a span of time, typically used for system timeouts.
  • Receive values from the associated UnboundedSender.
  • Send values to the associated UnboundedReceiver.
  • The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).
  • A double-ended queue implemented with a growable ring buffer.

Enums§

  • A clone-on-write smart pointer.
  • The month of the year.
  • RoundingStrategy represents the different rounding strategies that can be used by round_dp_with_strategy.
  • Specific formatting options for seconds. This may be extended in the future, so exhaustive matching in external code is not recommended.
  • Result is a type that represents either success (Ok) or failure (Err).
  • The day of week.

Traits§

  • Read bytes asynchronously.
  • Read bytes asynchronously.
  • Seek bytes asynchronously.
  • Write bytes asynchronously.
  • The common set of methods for date component.
  • A generic trait for converting a number to a value.
  • Parse a value from a string
  • A future represents an asynchronous computation obtained by use of async.
  • The offset from the local time to UTC.
  • Defines a multiplicative identity element for Self.
  • Useful functions for signed numbers (i.e. numbers that can be negative).
  • A Sink is a value into which other values can be sent, asynchronously.
  • A stream of values produced asynchronously.
  • Extension trait for subsecond rounding or truncation to a maximum number of digits. Rounding can be used to decrease the error variance when serializing/persisting to lower precision. Truncation is the default behavior in Chrono display formatting. Either can be used to guarantee equality (e.g. for testing) when round-tripping through a lower precision format.
  • The time zone.
  • The common set of methods for time component.
  • A generic trait for converting a value to a number.
  • A convenience for futures that return Result values that includes a variety of adapters tailored to such futures.
  • A convenience for streams that return Result values that includes a variety of adapters tailored to such futures.
  • Defines an additive identity element for Self.
  • An extension trait for Futures that provides a variety of convenient adapters.

Functions§

  • Equivalent to Ok::<_, anyhow::Error>(value).
  • Creates a bounded mpsc channel for communicating between asynchronous tasks with backpressure.
  • Completes when a “ctrl-c” notification is sent to the process.
  • Creates new Interval that yields with interval of period. The first tick completes immediately. The default MissedTickBehavior is Burst, but this can be configured by calling set_missed_tick_behavior.
  • Creates new Interval that yields with interval of period with the first tick completing at start. The default MissedTickBehavior is Burst, but this can be configured by calling set_missed_tick_behavior.
  • Waits until duration has elapsed.
  • Waits until deadline is reached.
  • Spawns a new asynchronous task, returning a JoinHandle for it.
  • Requires a Future to complete before the specified duration has elapsed.
  • Requires a Future to complete before the specified instant in time.
  • Creates an unbounded mpsc channel for communicating between asynchronous tasks without backpressure.
  • Yields execution back to the Tokio runtime.

Type Aliases§