Module ockam_core::compat
source · Expand description
A facade around the various collections and primitives needed to
support std
, no_std + alloc
or no_std
targets.
When importing from the standard library:
- always prefer
core::<mod>
overstd::<mod>
where it’s available. (e.g.std::fmt::Result
->core::fmt::Result
) - use
ockam_core::compat::<mod>
equivalents where possible. (e.g.std::sync::Arc
->ockam_core::compat::sync::Arc
) - if you need to add new items to compat, follow the originating
namespace. (e.g.
compat::vec::Vec
and notcompat::Vec
)
Modules§
- Provides
std::borrow
foralloc
targets. A module for working with borrowed data. - Provides
std::boxed
foralloc
targets. - Provides
std::collections
and alternatehashbrown
map and set implementations. - Provides a
std::error::Error
trait. - Provides
core::fmt
- Provides
future::poll_once
- Traits, helpers, and type definitions for core I/O functionality.
- Provides
std::net
. Networking primitives for TCP/UDP communication. - Provides
rand
. - Provides
std::str
. - Provides
std::string
. - Provides
std::sync
forstd
targets. - Provides
std::task
forstd
targets. Types and Traits for working with asynchronous tasks. - Provides
std::time
forstd
targets. - Provides
std::vec
.
Macros§
- Provides
std::format
foralloc
targets. Creates aString
using interpolation of runtime expressions.