Skip to main content

Crate cu29_traits

Crate cu29_traits 

Source
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::Error for CuError
    • Adds CuError::new_with_cause() method for interop with std error types

§no_std Usage

To use without the standard library:

[dependencies]
cu29-traits = { version = "0.9", default-features = false }

Structs§

CuCompactString
CuError
Common copper Error type.
CuMsgOrigin
Origin metadata captured when a Copper-aware transport receives a remote message.
ObservedWriter
A bincode writer wrapper that reports every encoded byte to Copper’s observation counters.
TaskOutputSpec
Trait to trace back from the CopperList the origin of each message slot.

Enums§

UnifiedLogType
Defines the types of what can be logged in the unified logger.

Constants§

COMPACT_STRING_CAPACITY

Traits§

CopperListTuple
A CopperListTuple needs to be encodable, decodable and fixed size in memory.
CuMsgMetadataTrait
Key metadata piece attached to every message in Copper.
CuPayloadRawBytes
Provides per-output raw payload sizes aligned with ErasedCuStampedDataSet::cumsgs order.
ErasedCuStampedData
A generic trait to expose the generated CuStampedDataSet from the task graph.
ErasedCuStampedDataSet
Trait to get a vector of type-erased CuStampedDataSet This is used for generic serialization of the copperlists
MatchingTasks
Metadata
Represent the minimum set of traits to be usable as Metadata in Copper.
PayloadSchemas
Trait for providing JSON schemas for CopperList payload types.
Reflect
A core trait of bevy_reflect, used for downcasting to concrete types.
WriteStream
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§

CuResult

Derive Macros§

Reflect
The main derive macro used by bevy_reflect for deriving its Reflect trait.