Expand description
Common copper traits and types for robotics systems.
This crate is no_std compatible by default. Enable the “std” feature for additional
functionality like implementing std::error::Error for CuError and the
new_with_cause method that accepts types implementing std::error::Error.
§Features
std(default): Enables standard library support- Implements
std::error::ErrorforCuError - Adds
CuError::new_with_cause()method for interop with std error types
- Implements
§no_std Usage
To use without the standard library:
[dependencies]
cu29-traits = { version = "0.9", default-features = false }Structs§
- CuCompact
String - CuError
- Common copper Error type.
- CuMsg
Origin - Origin metadata captured when a Copper-aware transport receives a remote message.
- Observed
Writer - A bincode writer wrapper that reports every encoded byte to Copper’s observation counters.
- Task
Output Spec - Trait to trace back from the CopperList the origin of each message slot.
Enums§
- Unified
LogType - Defines the types of what can be logged in the unified logger.
Constants§
Traits§
- Copper
List Tuple - A CopperListTuple needs to be encodable, decodable and fixed size in memory.
- CuMsg
Metadata Trait - Key metadata piece attached to every message in Copper.
- CuPayload
RawBytes - Provides per-output raw payload sizes aligned with
ErasedCuStampedDataSet::cumsgsorder. - Erased
CuStamped Data - A generic trait to expose the generated CuStampedDataSet from the task graph.
- Erased
CuStamped Data Set - Trait to get a vector of type-erased CuStampedDataSet This is used for generic serialization of the copperlists
- Matching
Tasks - Metadata
- Represent the minimum set of traits to be usable as Metadata in Copper.
- Payload
Schemas - Trait for providing JSON schemas for CopperList payload types.
- Reflect
- A core trait of
bevy_reflect, used for downcasting to concrete types. - Write
Stream - Defines a basic write, append only stream trait to be able to log or send serializable objects.
Functions§
- abort_
observed_ encode - Aborts any active observed byte counting session.
- begin_
observed_ encode - Starts observed byte counting for the current encode pass.
- finish_
observed_ encode - Ends observed byte counting and returns the total bytes written.
- observed_
encode_ bytes - Returns the number of bytes written so far in the current observed encode pass.
- record_
observed_ encode_ bytes - Records bytes written by an observed writer.
- with_
cause - Creates a CuError with a message and cause in a single call.
Type Aliases§
Derive Macros§
- Reflect
- The main derive macro used by
bevy_reflectfor deriving itsReflecttrait.