diff --git a/cu29/all.html b/cu29/all.html index 0261e144d..e45656b95 100644 --- a/cu29/all.html +++ b/cu29/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Attribute Macros

Functions

Type Aliases

Statics

Constants

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Attribute Macros

Functions

Type Aliases

Statics

Constants

\ No newline at end of file diff --git a/cu29/config/fn.read_configuration.html b/cu29/config/fn.read_configuration.html index 9a24d9f3d..cd4f2d0de 100644 --- a/cu29/config/fn.read_configuration.html +++ b/cu29/config/fn.read_configuration.html @@ -1,2 +1,2 @@ -read_configuration in cu29::config - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a file.

+read_configuration in cu29::config - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a file.

\ No newline at end of file diff --git a/cu29/config/fn.read_configuration_str.html b/cu29/config/fn.read_configuration_str.html index 181720bfd..8dc9a4db0 100644 --- a/cu29/config/fn.read_configuration_str.html +++ b/cu29/config/fn.read_configuration_str.html @@ -1,4 +1,4 @@ -read_configuration_str in cu29::config - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(
+read_configuration_str in cu29::config - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(
     config_content: String,
 ) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a String.

\ No newline at end of file diff --git a/cu29/config/index.html b/cu29/config/index.html index 246d4960b..5e91351c6 100644 --- a/cu29/config/index.html +++ b/cu29/config/index.html @@ -1,4 +1,4 @@ -cu29::config - Rust

Module config

Source
Expand description

This module defines the configuration of the copper runtime. +cu29::config - Rust

Module config

Source
Expand description

This module defines the configuration of the copper runtime. The configuration is a directed graph where nodes are tasks and edges are connections between tasks. The configuration is serialized in the RON format. The configuration is used to generate the runtime code at compile time.

diff --git a/cu29/config/struct.Cnx.html b/cu29/config/struct.Cnx.html index ef89d6d4e..71e5fa07e 100644 --- a/cu29/config/struct.Cnx.html +++ b/cu29/config/struct.Cnx.html @@ -1,4 +1,4 @@ -Cnx in cu29::config - Rust

Struct Cnx

Source
pub struct Cnx {
+Cnx in cu29::config - Rust

Struct Cnx

Source
pub struct Cnx {
     pub msg: String,
     pub batch: Option<u32>,
     pub store: Option<bool>,
diff --git a/cu29/config/struct.ComponentConfig.html b/cu29/config/struct.ComponentConfig.html
index 4c1791500..2a42b1532 100644
--- a/cu29/config/struct.ComponentConfig.html
+++ b/cu29/config/struct.ComponentConfig.html
@@ -1,4 +1,4 @@
-ComponentConfig in cu29::config - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w +ComponentConfig in cu29::config - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w It is a map of key-value pairs. It is given to the new method of the task implementation.

Tuple Fields§

§0: HashMap<String, Value>

Implementations§

Source§

impl ComponentConfig

Source

pub fn new() -> ComponentConfig

Source

pub fn get<T>(&self, key: &str) -> Option<T>
where diff --git a/cu29/config/struct.CuConfig.html b/cu29/config/struct.CuConfig.html index b5ed960f8..1e6f21c97 100644 --- a/cu29/config/struct.CuConfig.html +++ b/cu29/config/struct.CuConfig.html @@ -1,4 +1,4 @@ -CuConfig in cu29::config - Rust

Struct CuConfig

Source
pub struct CuConfig {
+CuConfig in cu29::config - Rust

Struct CuConfig

Source
pub struct CuConfig {
     pub graph: StableGraph<Node, Cnx>,
     pub monitor: Option<MonitorConfig>,
     pub logging: Option<LoggingConfig>,
diff --git a/cu29/config/struct.LoggingConfig.html b/cu29/config/struct.LoggingConfig.html
index 3879fa675..0c5d63fae 100644
--- a/cu29/config/struct.LoggingConfig.html
+++ b/cu29/config/struct.LoggingConfig.html
@@ -1,4 +1,4 @@
-LoggingConfig in cu29::config - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
+LoggingConfig in cu29::config - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
     pub slab_size_mib: Option<u64>,
     pub section_size_mib: Option<u64>,
     pub enable_task_logging: bool,
diff --git a/cu29/config/struct.MonitorConfig.html b/cu29/config/struct.MonitorConfig.html
index cb4d8f8ce..37bd66999 100644
--- a/cu29/config/struct.MonitorConfig.html
+++ b/cu29/config/struct.MonitorConfig.html
@@ -1,4 +1,4 @@
-MonitorConfig in cu29::config - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Clone for MonitorConfig

Source§

fn clone(&self) -> MonitorConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorConfig

Source§

fn default() -> MonitorConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorConfig

Source§

fn deserialize<__D>( +MonitorConfig in cu29::config - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Clone for MonitorConfig

Source§

fn clone(&self) -> MonitorConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorConfig

Source§

fn default() -> MonitorConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorConfig

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<MonitorConfig, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for MonitorConfig

Source§

fn serialize<__S>( diff --git a/cu29/config/struct.Node.html b/cu29/config/struct.Node.html index d6de2911b..53b7771d5 100644 --- a/cu29/config/struct.Node.html +++ b/cu29/config/struct.Node.html @@ -1,4 +1,4 @@ -Node in cu29::config - Rust

Struct Node

Source
pub struct Node { /* private fields */ }
Expand description

A node in the configuration graph. +Node in cu29::config - Rust

Struct Node

Source
pub struct Node { /* private fields */ }
Expand description

A node in the configuration graph. A node represents a Task in the system Graph.

Implementations§

Source§

impl Node

Source

pub fn new(id: &str, ptype: &str) -> Node

Source

pub fn get_id(&self) -> String

Source

pub fn set_type(self, name: Option<String>) -> Node

Source

pub fn get_type(&self) -> &str

Source

pub fn get_instance_config(&self) -> Option<&ComponentConfig>

Source

pub fn get_param<T>(&self, key: &str) -> Option<T>
where T: From<Value>,

Source

pub fn set_param<T>(&mut self, key: &str, value: T)
where diff --git a/cu29/config/struct.Value.html b/cu29/config/struct.Value.html index 31d037a32..6c4117602 100644 --- a/cu29/config/struct.Value.html +++ b/cu29/config/struct.Value.html @@ -1,4 +1,4 @@ -Value in cu29::config - Rust

Struct Value

Source
pub struct Value(/* private fields */);
Expand description

Wrapper around the ron::Value to allow for custom serialization.

+Value in cu29::config - Rust

Struct Value

Source
pub struct Value(/* private fields */);
Expand description

Wrapper around the ron::Value to allow for custom serialization.

Trait Implementations§

Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Value

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Value, <__D as Deserializer<'de>>::Error>
where diff --git a/cu29/config/type.NodeId.html b/cu29/config/type.NodeId.html index 0379cd159..ede07379b 100644 --- a/cu29/config/type.NodeId.html +++ b/cu29/config/type.NodeId.html @@ -1,3 +1,3 @@ -NodeId in cu29::config - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph +NodeId in cu29::config - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph and the code generation.

\ No newline at end of file diff --git a/cu29/copperlist/enum.CopperListState.html b/cu29/copperlist/enum.CopperListState.html index 6955c0186..ff3263995 100644 --- a/cu29/copperlist/enum.CopperListState.html +++ b/cu29/copperlist/enum.CopperListState.html @@ -1,4 +1,4 @@ -CopperListState in cu29::copperlist - Rust

Enum CopperListState

Source
pub enum CopperListState {
+CopperListState in cu29::copperlist - Rust

Enum CopperListState

Source
pub enum CopperListState {
     Free,
     Initialized,
     Processing,
diff --git a/cu29/copperlist/index.html b/cu29/copperlist/index.html
index 6817e9498..0c89913fa 100644
--- a/cu29/copperlist/index.html
+++ b/cu29/copperlist/index.html
@@ -1,4 +1,4 @@
-cu29::copperlist - Rust

Module copperlist

Source
Expand description

CopperList is the main data structure used by Copper to communicate between tasks. +cu29::copperlist - Rust

Module copperlist

Source
Expand description

CopperList is the main data structure used by Copper to communicate between tasks. It is a queue that can be used to store preallocated messages between tasks in memory order.

Structs§

CopperLiskMask
Not implemented yet. This mask will be used to for example filter out necessary regions of a copper list between remote systems.
CopperList
CuListsManager
This structure maintains the entire memory needed by Copper for one loop for the inter tasks communication within a process. diff --git a/cu29/copperlist/struct.CopperLiskMask.html b/cu29/copperlist/struct.CopperLiskMask.html index 2e0e07184..ac138dec9 100644 --- a/cu29/copperlist/struct.CopperLiskMask.html +++ b/cu29/copperlist/struct.CopperLiskMask.html @@ -1,4 +1,4 @@ -CopperLiskMask in cu29::copperlist - Rust

Struct CopperLiskMask

Source
pub struct CopperLiskMask { /* private fields */ }
Expand description

Not implemented yet. +CopperLiskMask in cu29::copperlist - Rust

Struct CopperLiskMask

Source
pub struct CopperLiskMask { /* private fields */ }
Expand description

Not implemented yet. This mask will be used to for example filter out necessary regions of a copper list between remote systems.

Trait Implementations§

Source§

impl<'__de> BorrowDecode<'__de> for CopperLiskMask

Source§

fn borrow_decode<__D>(decoder: &mut __D) -> Result<CopperLiskMask, DecodeError>
where __D: BorrowDecoder<'__de>,

Attempt to decode this type with the given BorrowDecode.
Source§

impl Clone for CopperLiskMask

Source§

fn clone(&self) -> CopperLiskMask

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CopperLiskMask

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Decode for CopperLiskMask

Source§

fn decode<__D>(decoder: &mut __D) -> Result<CopperLiskMask, DecodeError>
where diff --git a/cu29/copperlist/struct.CopperList.html b/cu29/copperlist/struct.CopperList.html index 7f32b257a..04ff295e7 100644 --- a/cu29/copperlist/struct.CopperList.html +++ b/cu29/copperlist/struct.CopperList.html @@ -1,4 +1,4 @@ -CopperList in cu29::copperlist - Rust

Struct CopperList

Source
pub struct CopperList<P>
where +CopperList in cu29::copperlist - Rust

Struct CopperList

Source
pub struct CopperList<P>
where P: CopperListTuple,
{ pub id: u32, pub msgs: P, diff --git a/cu29/copperlist/struct.CuListsManager.html b/cu29/copperlist/struct.CuListsManager.html index ba994856d..5c313cd5a 100644 --- a/cu29/copperlist/struct.CuListsManager.html +++ b/cu29/copperlist/struct.CuListsManager.html @@ -1,4 +1,4 @@ -CuListsManager in cu29::copperlist - Rust

Struct CuListsManager

Source
pub struct CuListsManager<P, const N: usize>
where +CuListsManager in cu29::copperlist - Rust

Struct CuListsManager

Source
pub struct CuListsManager<P, const N: usize>
where P: CopperListTuple,
{ /* private fields */ }
Expand description

This structure maintains the entire memory needed by Copper for one loop for the inter tasks communication within a process. P or Payload is typically a Tuple of various types of messages that are exchanged between tasks. N is the maximum number of in flight Copper List the runtime can support.

diff --git a/cu29/copperlist/type.AscIter.html b/cu29/copperlist/type.AscIter.html index fbfdda38e..4226847d8 100644 --- a/cu29/copperlist/type.AscIter.html +++ b/cu29/copperlist/type.AscIter.html @@ -1 +1 @@ -AscIter in cu29::copperlist - Rust

Type Alias AscIter

Source
pub type AscIter<'a, T> = Chain<Iter<'a, T>, Iter<'a, T>>;

Aliased Type§

struct AscIter<'a, T> { /* private fields */ }
\ No newline at end of file +AscIter in cu29::copperlist - Rust

Type Alias AscIter

Source
pub type AscIter<'a, T> = Chain<Iter<'a, T>, Iter<'a, T>>;

Aliased Type§

struct AscIter<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/copperlist/type.AscIterMut.html b/cu29/copperlist/type.AscIterMut.html index dab196e44..ce759734c 100644 --- a/cu29/copperlist/type.AscIterMut.html +++ b/cu29/copperlist/type.AscIterMut.html @@ -1 +1 @@ -AscIterMut in cu29::copperlist - Rust

Type Alias AscIterMut

Source
pub type AscIterMut<'a, T> = Chain<IterMut<'a, T>, IterMut<'a, T>>;

Aliased Type§

struct AscIterMut<'a, T> { /* private fields */ }
\ No newline at end of file +AscIterMut in cu29::copperlist - Rust

Type Alias AscIterMut

Source
pub type AscIterMut<'a, T> = Chain<IterMut<'a, T>, IterMut<'a, T>>;

Aliased Type§

struct AscIterMut<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/copperlist/type.Iter.html b/cu29/copperlist/type.Iter.html index b46011a6b..611bfeb24 100644 --- a/cu29/copperlist/type.Iter.html +++ b/cu29/copperlist/type.Iter.html @@ -1 +1 @@ -Iter in cu29::copperlist - Rust

Type Alias Iter

Source
pub type Iter<'a, T> = Chain<Rev<Iter<'a, T>>, Rev<Iter<'a, T>>>;

Aliased Type§

struct Iter<'a, T> { /* private fields */ }
\ No newline at end of file +Iter in cu29::copperlist - Rust

Type Alias Iter

Source
pub type Iter<'a, T> = Chain<Rev<Iter<'a, T>>, Rev<Iter<'a, T>>>;

Aliased Type§

struct Iter<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/copperlist/type.IterMut.html b/cu29/copperlist/type.IterMut.html index 96486b84f..cb645cdb1 100644 --- a/cu29/copperlist/type.IterMut.html +++ b/cu29/copperlist/type.IterMut.html @@ -1 +1 @@ -IterMut in cu29::copperlist - Rust

Type Alias IterMut

Source
pub type IterMut<'a, T> = Chain<Rev<IterMut<'a, T>>, Rev<IterMut<'a, T>>>;

Aliased Type§

struct IterMut<'a, T> { /* private fields */ }
\ No newline at end of file +IterMut in cu29::copperlist - Rust

Type Alias IterMut

Source
pub type IterMut<'a, T> = Chain<Rev<IterMut<'a, T>>, Rev<IterMut<'a, T>>>;

Aliased Type§

struct IterMut<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/curuntime/enum.CuExecutionUnit.html b/cu29/curuntime/enum.CuExecutionUnit.html index 915ab42bf..7171f6519 100644 --- a/cu29/curuntime/enum.CuExecutionUnit.html +++ b/cu29/curuntime/enum.CuExecutionUnit.html @@ -1,4 +1,4 @@ -CuExecutionUnit in cu29::curuntime - Rust

Enum CuExecutionUnit

Source
pub enum CuExecutionUnit {
+CuExecutionUnit in cu29::curuntime - Rust

Enum CuExecutionUnit

Source
pub enum CuExecutionUnit {
     Step(CuExecutionStep),
     Loop(CuExecutionLoop),
 }
Expand description

This structure represents a step in the execution plan.

diff --git a/cu29/curuntime/enum.CuTaskType.html b/cu29/curuntime/enum.CuTaskType.html index da0708780..61fa5e877 100644 --- a/cu29/curuntime/enum.CuTaskType.html +++ b/cu29/curuntime/enum.CuTaskType.html @@ -1,4 +1,4 @@ -CuTaskType in cu29::curuntime - Rust

Enum CuTaskType

Source
pub enum CuTaskType {
+CuTaskType in cu29::curuntime - Rust

Enum CuTaskType

Source
pub enum CuTaskType {
     Source,
     Regular,
     Sink,
diff --git a/cu29/curuntime/fn.compute_runtime_plan.html b/cu29/curuntime/fn.compute_runtime_plan.html
index b4d1f6db0..7bc3eb51c 100644
--- a/cu29/curuntime/fn.compute_runtime_plan.html
+++ b/cu29/curuntime/fn.compute_runtime_plan.html
@@ -1,4 +1,4 @@
-compute_runtime_plan in cu29::curuntime - Rust

Function compute_runtime_plan

Source
pub fn compute_runtime_plan(
+compute_runtime_plan in cu29::curuntime - Rust

Function compute_runtime_plan

Source
pub fn compute_runtime_plan(
     config: &CuConfig,
 ) -> Result<CuExecutionLoop, CuError>
Expand description

This is the main heuristics to compute an execution plan at compilation time. TODO: Make that heuristic pluggable.

diff --git a/cu29/curuntime/fn.find_task_type_for_id.html b/cu29/curuntime/fn.find_task_type_for_id.html index 9cf67caa7..46a3a1d97 100644 --- a/cu29/curuntime/fn.find_task_type_for_id.html +++ b/cu29/curuntime/fn.find_task_type_for_id.html @@ -1,4 +1,4 @@ -find_task_type_for_id in cu29::curuntime - Rust

Function find_task_type_for_id

Source
pub fn find_task_type_for_id(
+find_task_type_for_id in cu29::curuntime - Rust

Function find_task_type_for_id

Source
pub fn find_task_type_for_id(
     graph: &StableGraph<Node, Cnx>,
     node_id: u32,
 ) -> CuTaskType
\ No newline at end of file diff --git a/cu29/curuntime/index.html b/cu29/curuntime/index.html index 51d0751a9..6749aae63 100644 --- a/cu29/curuntime/index.html +++ b/cu29/curuntime/index.html @@ -1,4 +1,4 @@ -cu29::curuntime - Rust

Module curuntime

Source
Expand description

CuRuntime is the heart of what copper is running on the robot. +cu29::curuntime - Rust

Module curuntime

Source
Expand description

CuRuntime is the heart of what copper is running on the robot. It is exposed to the user via the copper_runtime macro injecting it as a field in their application struct.

Structs§

CopperContext
Just a simple struct to hold the various bits needed to run a Copper application.
CuExecutionLoop
This structure represents a loop in the execution plan. It is used to represent a sequence of Execution units (loop or steps) that are executed diff --git a/cu29/curuntime/struct.CopperContext.html b/cu29/curuntime/struct.CopperContext.html index 8177f7ad1..382242bdf 100644 --- a/cu29/curuntime/struct.CopperContext.html +++ b/cu29/curuntime/struct.CopperContext.html @@ -1,4 +1,4 @@ -CopperContext in cu29::curuntime - Rust

Struct CopperContext

Source
pub struct CopperContext {
+CopperContext in cu29::curuntime - Rust

Struct CopperContext

Source
pub struct CopperContext {
     pub unified_logger: Arc<Mutex<UnifiedLoggerWrite>>,
     pub logger_runtime: LoggerRuntime,
     pub clock: RobotClock,
diff --git a/cu29/curuntime/struct.CuExecutionLoop.html b/cu29/curuntime/struct.CuExecutionLoop.html
index 58543ddc4..ecbb90f1f 100644
--- a/cu29/curuntime/struct.CuExecutionLoop.html
+++ b/cu29/curuntime/struct.CuExecutionLoop.html
@@ -1,4 +1,4 @@
-CuExecutionLoop in cu29::curuntime - Rust

Struct CuExecutionLoop

Source
pub struct CuExecutionLoop {
+CuExecutionLoop in cu29::curuntime - Rust

Struct CuExecutionLoop

Source
pub struct CuExecutionLoop {
     pub steps: Vec<CuExecutionUnit>,
     pub loop_count: Option<u32>,
 }
Expand description

This structure represents a loop in the execution plan. diff --git a/cu29/curuntime/struct.CuExecutionStep.html b/cu29/curuntime/struct.CuExecutionStep.html index 355739208..97cd8215d 100644 --- a/cu29/curuntime/struct.CuExecutionStep.html +++ b/cu29/curuntime/struct.CuExecutionStep.html @@ -1,4 +1,4 @@ -CuExecutionStep in cu29::curuntime - Rust

Struct CuExecutionStep

Source
pub struct CuExecutionStep {
+CuExecutionStep in cu29::curuntime - Rust

Struct CuExecutionStep

Source
pub struct CuExecutionStep {
     pub node_id: u32,
     pub node: Node,
     pub task_type: CuTaskType,
diff --git a/cu29/curuntime/struct.CuRuntime.html b/cu29/curuntime/struct.CuRuntime.html
index c9c0cf60c..100edd975 100644
--- a/cu29/curuntime/struct.CuRuntime.html
+++ b/cu29/curuntime/struct.CuRuntime.html
@@ -1,4 +1,4 @@
-CuRuntime in cu29::curuntime - Rust

Struct CuRuntime

Source
pub struct CuRuntime<CT, P, M, const NBCL: usize>
where +CuRuntime in cu29::curuntime - Rust

Struct CuRuntime

Source
pub struct CuRuntime<CT, P, M, const NBCL: usize>{
     pub tasks: CT,
diff --git a/cu29/cutask/index.html b/cu29/cutask/index.html
index 44d0412fc..c4453947e 100644
--- a/cu29/cutask/index.html
+++ b/cu29/cutask/index.html
@@ -1,4 +1,4 @@
-cu29::cutask - Rust

Module cutask

Source
Expand description

This module contains all the main definition of the traits you need to implement +cu29::cutask - Rust

Module cutask

Source
Expand description

This module contains all the main definition of the traits you need to implement or interact with to create a Copper task.

Structs§

CuCompactString
CuMsg
CuMsg is the envelope holding the msg payload and the metadata between tasks.
CuMsgMetadata
CuMsgMetadata is a structure that contains metadata common to all CuMsgs.

Traits§

CuMsgPack
CuMsgPayload
CuSinkTask
A Sink Task is a task that only consumes messages. For example drivers for actuators are Sink Tasks.
CuSrcTask
A Src Task is a task that only produces messages. For example drivers for sensors are Src Tasks. They are in push mode from the runtime. diff --git a/cu29/cutask/struct.CuCompactString.html b/cu29/cutask/struct.CuCompactString.html index ae9fa5ffc..a640bbd29 100644 --- a/cu29/cutask/struct.CuCompactString.html +++ b/cu29/cutask/struct.CuCompactString.html @@ -1,4 +1,4 @@ -CuCompactString in cu29::cutask - Rust

Struct CuCompactString

Source
pub struct CuCompactString(pub CompactString);

Tuple Fields§

§0: CompactString

Trait Implementations§

Source§

impl<'de> BorrowDecode<'de> for CuCompactString

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<CuCompactString, DecodeError>
where +CuCompactString in cu29::cutask - Rust

Struct CuCompactString

Source
pub struct CuCompactString(pub CompactString);

Tuple Fields§

§0: CompactString

Trait Implementations§

Source§

impl<'de> BorrowDecode<'de> for CuCompactString

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<CuCompactString, DecodeError>
where D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
Source§

impl Clone for CuCompactString

Source§

fn clone(&self) -> CuCompactString

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CuCompactString

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Decode for CuCompactString

Source§

fn decode<D>(decoder: &mut D) -> Result<CuCompactString, DecodeError>
where D: Decoder,

Attempt to decode this type with the given Decode.
Source§

impl Default for CuCompactString

Source§

fn default() -> CuCompactString

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CuCompactString

Source§

fn deserialize<__D>( __deserializer: __D, diff --git a/cu29/cutask/struct.CuMsg.html b/cu29/cutask/struct.CuMsg.html index b6c0d72d8..42b545a48 100644 --- a/cu29/cutask/struct.CuMsg.html +++ b/cu29/cutask/struct.CuMsg.html @@ -1,4 +1,4 @@ -CuMsg in cu29::cutask - Rust

Struct CuMsg

Source
pub struct CuMsg<T>
where +CuMsg in cu29::cutask - Rust

Struct CuMsg

Source
pub struct CuMsg<T>
where T: CuMsgPayload,
{ pub metadata: CuMsgMetadata, /* private fields */ diff --git a/cu29/cutask/struct.CuMsgMetadata.html b/cu29/cutask/struct.CuMsgMetadata.html index 1a9be76f5..bb5f4144a 100644 --- a/cu29/cutask/struct.CuMsgMetadata.html +++ b/cu29/cutask/struct.CuMsgMetadata.html @@ -1,4 +1,4 @@ -CuMsgMetadata in cu29::cutask - Rust

Struct CuMsgMetadata

Source
pub struct CuMsgMetadata {
+CuMsgMetadata in cu29::cutask - Rust

Struct CuMsgMetadata

Source
pub struct CuMsgMetadata {
     pub process_time: PartialCuTimeRange,
     pub tov: Tov,
     pub status_txt: CuCompactString,
diff --git a/cu29/cutask/trait.CuMsgPack.html b/cu29/cutask/trait.CuMsgPack.html
index 33ad44205..b579150ca 100644
--- a/cu29/cutask/trait.CuMsgPack.html
+++ b/cu29/cutask/trait.CuMsgPack.html
@@ -1,4 +1,4 @@
-CuMsgPack in cu29::cutask - Rust

Trait CuMsgPack

Source
pub trait CuMsgPack<'cl> { }

Implementations on Foreign Types§

Source§

impl CuMsgPack<'_> for ()

Source§

impl<'cl, T1, T2> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>)
where +CuMsgPack in cu29::cutask - Rust

Trait CuMsgPack

Source
pub trait CuMsgPack<'cl> { }

Implementations on Foreign Types§

Source§

impl CuMsgPack<'_> for ()

Source§

impl<'cl, T1, T2> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>)
where T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl,

Source§

impl<'cl, T1, T2, T3> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>, &'cl CuMsg<T3>)
where T1: CuMsgPayload + 'cl, diff --git a/cu29/cutask/trait.CuMsgPayload.html b/cu29/cutask/trait.CuMsgPayload.html index 1d44a62a1..9a0611fad 100644 --- a/cu29/cutask/trait.CuMsgPayload.html +++ b/cu29/cutask/trait.CuMsgPayload.html @@ -1,4 +1,4 @@ -CuMsgPayload in cu29::cutask - Rust

Trait CuMsgPayload

Source
pub trait CuMsgPayload:
+CuMsgPayload in cu29::cutask - Rust

Trait CuMsgPayload

Source
pub trait CuMsgPayload:
     Sized
     + Default
     + Debug
diff --git a/cu29/cutask/trait.CuSinkTask.html b/cu29/cutask/trait.CuSinkTask.html
index 6428e2aed..b36b3d37a 100644
--- a/cu29/cutask/trait.CuSinkTask.html
+++ b/cu29/cutask/trait.CuSinkTask.html
@@ -1,4 +1,4 @@
-CuSinkTask in cu29::cutask - Rust

Trait CuSinkTask

Source
pub trait CuSinkTask<'cl>: Freezable {
+CuSinkTask in cu29::cutask - Rust

Trait CuSinkTask

Source
pub trait CuSinkTask<'cl>: Freezable {
     type Input: CuMsgPack<'cl>;
 
     // Required methods
diff --git a/cu29/cutask/trait.CuSrcTask.html b/cu29/cutask/trait.CuSrcTask.html
index 871c315e8..821ddef81 100644
--- a/cu29/cutask/trait.CuSrcTask.html
+++ b/cu29/cutask/trait.CuSrcTask.html
@@ -1,4 +1,4 @@
-CuSrcTask in cu29::cutask - Rust

Trait CuSrcTask

Source
pub trait CuSrcTask<'cl>: Freezable {
+CuSrcTask in cu29::cutask - Rust

Trait CuSrcTask

Source
pub trait CuSrcTask<'cl>: Freezable {
     type Output: CuMsgPack<'cl>;
 
     // Required methods
diff --git a/cu29/cutask/trait.CuTask.html b/cu29/cutask/trait.CuTask.html
index 3b450997d..a2190aead 100644
--- a/cu29/cutask/trait.CuTask.html
+++ b/cu29/cutask/trait.CuTask.html
@@ -1,4 +1,4 @@
-CuTask in cu29::cutask - Rust

Trait CuTask

Source
pub trait CuTask<'cl>: Freezable {
+CuTask in cu29::cutask - Rust

Trait CuTask

Source
pub trait CuTask<'cl>: Freezable {
     type Input: CuMsgPack<'cl>;
     type Output: CuMsgPack<'cl>;
 
diff --git a/cu29/cutask/trait.Freezable.html b/cu29/cutask/trait.Freezable.html
index 627cb3088..4118c0d5f 100644
--- a/cu29/cutask/trait.Freezable.html
+++ b/cu29/cutask/trait.Freezable.html
@@ -1,4 +1,4 @@
-Freezable in cu29::cutask - Rust

Trait Freezable

Source
pub trait Freezable {
+Freezable in cu29::cutask - Rust

Trait Freezable

Source
pub trait Freezable {
     // Provided methods
     fn freeze<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
        where E: Encoder { ... }
diff --git a/cu29/enum.UnifiedLogType.html b/cu29/enum.UnifiedLogType.html
index 269c3c437..88fea9a15 100644
--- a/cu29/enum.UnifiedLogType.html
+++ b/cu29/enum.UnifiedLogType.html
@@ -1,4 +1,4 @@
-UnifiedLogType in cu29 - Rust

Enum UnifiedLogType

pub enum UnifiedLogType {
+UnifiedLogType in cu29 - Rust

Enum UnifiedLogType

pub enum UnifiedLogType {
     Empty,
     StructuredLogLine,
     CopperList,
diff --git a/cu29/fn.read_configuration.html b/cu29/fn.read_configuration.html
index 6280d4679..84ff52003 100644
--- a/cu29/fn.read_configuration.html
+++ b/cu29/fn.read_configuration.html
@@ -1,2 +1,2 @@
-read_configuration in cu29 - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a file.

+read_configuration in cu29 - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a file.

\ No newline at end of file diff --git a/cu29/index.html b/cu29/index.html index 34f88f8c5..da3aab9da 100644 --- a/cu29/index.html +++ b/cu29/index.html @@ -1,4 +1,4 @@ -cu29 - Rust

Crate cu29

Source
Expand description
logo +cu29 - Rust

Crate cu29

Source
Expand description
logo

§

§Copper

copper GitHub last commit diff --git a/cu29/macro.input_msg.html b/cu29/macro.input_msg.html index 715f23a1d..6adad6b40 100644 --- a/cu29/macro.input_msg.html +++ b/cu29/macro.input_msg.html @@ -1,4 +1,4 @@ -input_msg in cu29 - Rust

Macro input_msg

Source
macro_rules! input_msg {
+input_msg in cu29 - Rust

Macro input_msg

Source
macro_rules! input_msg {
     ($lifetime:lifetime, $ty:ty) => { ... };
     ($lifetime:lifetime, $($ty:ty),*) => { ... };
 }
\ No newline at end of file diff --git a/cu29/macro.output_msg.html b/cu29/macro.output_msg.html index 78ea73d83..09efdde29 100644 --- a/cu29/macro.output_msg.html +++ b/cu29/macro.output_msg.html @@ -1,3 +1,3 @@ -output_msg in cu29 - Rust

Macro output_msg

Source
macro_rules! output_msg {
+output_msg in cu29 - Rust

Macro output_msg

Source
macro_rules! output_msg {
     ($lifetime:lifetime, $ty:ty) => { ... };
 }
\ No newline at end of file diff --git a/cu29/monitoring/enum.CuTaskState.html b/cu29/monitoring/enum.CuTaskState.html index 84f35b6cb..014d8f1eb 100644 --- a/cu29/monitoring/enum.CuTaskState.html +++ b/cu29/monitoring/enum.CuTaskState.html @@ -1,4 +1,4 @@ -CuTaskState in cu29::monitoring - Rust

Enum CuTaskState

Source
pub enum CuTaskState {
+CuTaskState in cu29::monitoring - Rust

Enum CuTaskState

Source
pub enum CuTaskState {
     Start,
     Preprocess,
     Process,
diff --git a/cu29/monitoring/enum.Decision.html b/cu29/monitoring/enum.Decision.html
index 383615d3b..74041d89f 100644
--- a/cu29/monitoring/enum.Decision.html
+++ b/cu29/monitoring/enum.Decision.html
@@ -1,4 +1,4 @@
-Decision in cu29::monitoring - Rust

Enum Decision

Source
pub enum Decision {
+Decision in cu29::monitoring - Rust

Enum Decision

Source
pub enum Decision {
     Abort,
     Ignore,
     Shutdown,
diff --git a/cu29/monitoring/index.html b/cu29/monitoring/index.html
index b09e176cb..4437d6fc4 100644
--- a/cu29/monitoring/index.html
+++ b/cu29/monitoring/index.html
@@ -1,4 +1,4 @@
-cu29::monitoring - Rust

Module monitoring

Source
Expand description

Some basic internal monitoring tooling Copper uses to monitor itself and the tasks it is running.

+cu29::monitoring - Rust

Module monitoring

Source
Expand description

Some basic internal monitoring tooling Copper uses to monitor itself and the tasks it is running.

Structs§

CountingAllocator
A simple allocator that counts the number of bytes allocated and deallocated.
CuDurationStatistics
A Specialized statistics object for CuDuration. It will also keep track of the jitter between the values.
LiveStatistics
Accumulative stat object that can give your some real time statistics.
NoMonitor
A do nothing monitor if no monitor is provided. This is basically defining the default behavior of Copper in case of error.
ScopedAllocCounter
A simple struct that counts the number of bytes allocated and deallocated in a scope.

Enums§

CuTaskState
The state of a task.
Decision
Monitor decision to be taken when a task errored out.

Statics§

GLOBAL

Traits§

CuMonitor
Trait to implement a monitoring task.
\ No newline at end of file diff --git a/cu29/monitoring/static.GLOBAL.html b/cu29/monitoring/static.GLOBAL.html index 46cb7c314..3a8a5c05e 100644 --- a/cu29/monitoring/static.GLOBAL.html +++ b/cu29/monitoring/static.GLOBAL.html @@ -1 +1 @@ -GLOBAL in cu29::monitoring - Rust

Static GLOBAL

Source
pub static GLOBAL: CountingAllocator
\ No newline at end of file +GLOBAL in cu29::monitoring - Rust

Static GLOBAL

Source
pub static GLOBAL: CountingAllocator
\ No newline at end of file diff --git a/cu29/monitoring/struct.CountingAllocator.html b/cu29/monitoring/struct.CountingAllocator.html index a9c8ba9d6..46d038ced 100644 --- a/cu29/monitoring/struct.CountingAllocator.html +++ b/cu29/monitoring/struct.CountingAllocator.html @@ -1,4 +1,4 @@ -CountingAllocator in cu29::monitoring - Rust

Struct CountingAllocator

Source
pub struct CountingAllocator { /* private fields */ }
Expand description

A simple allocator that counts the number of bytes allocated and deallocated.

+CountingAllocator in cu29::monitoring - Rust

Struct CountingAllocator

Source
pub struct CountingAllocator { /* private fields */ }
Expand description

A simple allocator that counts the number of bytes allocated and deallocated.

Implementations§

Trait Implementations§

Source§

impl Default for CountingAllocator

Source§

fn default() -> CountingAllocator

Returns the “default value” for a type. Read more
Source§

impl GlobalAlloc for CountingAllocator

Source§

unsafe fn alloc(&self, layout: Layout) -> *mut u8

Allocates memory as described by the given layout. Read more
Source§

unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout)

Deallocates the block of memory at the given ptr pointer with the given layout. Read more
1.28.0 · Source§

unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8

Behaves like alloc, but also ensures that the contents are set to zero before being returned. Read more
1.28.0 · Source§

unsafe fn realloc( &self, diff --git a/cu29/monitoring/struct.CuDurationStatistics.html b/cu29/monitoring/struct.CuDurationStatistics.html index df0d30a33..bbb94bd62 100644 --- a/cu29/monitoring/struct.CuDurationStatistics.html +++ b/cu29/monitoring/struct.CuDurationStatistics.html @@ -1,4 +1,4 @@ -CuDurationStatistics in cu29::monitoring - Rust

Struct CuDurationStatistics

Source
pub struct CuDurationStatistics { /* private fields */ }
Expand description

A Specialized statistics object for CuDuration. +CuDurationStatistics in cu29::monitoring - Rust

Struct CuDurationStatistics

Source
pub struct CuDurationStatistics { /* private fields */ }
Expand description

A Specialized statistics object for CuDuration. It will also keep track of the jitter between the values.

Implementations§

Source§

impl CuDurationStatistics

Source

pub fn new(max: CuDuration) -> CuDurationStatistics

Source

pub fn min(&self) -> CuDuration

Source

pub fn max(&self) -> CuDuration

Source

pub fn mean(&self) -> CuDuration

Source

pub fn percentile(&self, percentile: f64) -> CuDuration

Source

pub fn stddev(&self) -> CuDuration

Source

pub fn len(&self) -> u64

Source

pub fn is_empty(&self) -> bool

Source

pub fn jitter_min(&self) -> CuDuration

Source

pub fn jitter_max(&self) -> CuDuration

Source

pub fn jitter_mean(&self) -> CuDuration

Source

pub fn jitter_stddev(&self) -> CuDuration

Source

pub fn jitter_percentile(&self, percentile: f64) -> CuDuration

Source

pub fn record(&mut self, value: CuDuration)

Source

pub fn reset(&mut self)

Trait Implementations§

Source§

impl Clone for CuDurationStatistics

Source§

fn clone(&self) -> CuDurationStatistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CuDurationStatistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29/monitoring/struct.LiveStatistics.html b/cu29/monitoring/struct.LiveStatistics.html index 05cffd84a..89ca05bd9 100644 --- a/cu29/monitoring/struct.LiveStatistics.html +++ b/cu29/monitoring/struct.LiveStatistics.html @@ -1,4 +1,4 @@ -LiveStatistics in cu29::monitoring - Rust

Struct LiveStatistics

Source
pub struct LiveStatistics { /* private fields */ }
Expand description

Accumulative stat object that can give your some real time statistics.

+LiveStatistics in cu29::monitoring - Rust

Struct LiveStatistics

Source
pub struct LiveStatistics { /* private fields */ }
Expand description

Accumulative stat object that can give your some real time statistics.

Implementations§

Source§

impl LiveStatistics

Source

pub fn new_unbounded() -> LiveStatistics

Source

pub fn new_with_max(max: u64) -> LiveStatistics

Source

pub fn min(&self) -> u64

Source

pub fn max(&self) -> u64

Source

pub fn mean(&self) -> f64

Source

pub fn percentile(&self, percentile: f64) -> u64

Source

pub fn record(&mut self, value: u64)

Adds a value to the statistics.

Source

pub fn len(&self) -> u64

Source

pub fn is_empty(&self) -> bool

Source

pub fn reset(&mut self)

Trait Implementations§

Source§

impl Clone for LiveStatistics

Source§

fn clone(&self) -> LiveStatistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LiveStatistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29/monitoring/struct.NoMonitor.html b/cu29/monitoring/struct.NoMonitor.html index 0a7745ce7..246c0b121 100644 --- a/cu29/monitoring/struct.NoMonitor.html +++ b/cu29/monitoring/struct.NoMonitor.html @@ -1,4 +1,4 @@ -NoMonitor in cu29::monitoring - Rust

Struct NoMonitor

Source
pub struct NoMonitor {}
Expand description

A do nothing monitor if no monitor is provided. +NoMonitor in cu29::monitoring - Rust

Struct NoMonitor

Source
pub struct NoMonitor {}
Expand description

A do nothing monitor if no monitor is provided. This is basically defining the default behavior of Copper in case of error.

Trait Implementations§

Source§

impl CuMonitor for NoMonitor

Source§

fn new( _config: &CuConfig, diff --git a/cu29/monitoring/struct.ScopedAllocCounter.html b/cu29/monitoring/struct.ScopedAllocCounter.html index d872e3c4b..ef228b842 100644 --- a/cu29/monitoring/struct.ScopedAllocCounter.html +++ b/cu29/monitoring/struct.ScopedAllocCounter.html @@ -1,4 +1,4 @@ -ScopedAllocCounter in cu29::monitoring - Rust

Struct ScopedAllocCounter

Source
pub struct ScopedAllocCounter { /* private fields */ }
Expand description

A simple struct that counts the number of bytes allocated and deallocated in a scope.

+ScopedAllocCounter in cu29::monitoring - Rust

Struct ScopedAllocCounter

Source
pub struct ScopedAllocCounter { /* private fields */ }
Expand description

A simple struct that counts the number of bytes allocated and deallocated in a scope.

Implementations§

Source§

impl ScopedAllocCounter

Source

pub fn new() -> ScopedAllocCounter

Source

pub fn get_allocated(&self) -> usize

Returns the total number of bytes allocated in the current scope since the creation of this ScopedAllocCounter.

§Example
diff --git a/cu29/monitoring/trait.CuMonitor.html b/cu29/monitoring/trait.CuMonitor.html index ffb5cc433..8985f117f 100644 --- a/cu29/monitoring/trait.CuMonitor.html +++ b/cu29/monitoring/trait.CuMonitor.html @@ -1,4 +1,4 @@ -CuMonitor in cu29::monitoring - Rust

Trait CuMonitor

Source
pub trait CuMonitor: Sized {
+CuMonitor in cu29::monitoring - Rust

Trait CuMonitor

Source
pub trait CuMonitor: Sized {
     // Required methods
     fn new(
         config: &CuConfig,
diff --git a/cu29/payload/index.html b/cu29/payload/index.html
index d30ca1db6..4af2dbd34 100644
--- a/cu29/payload/index.html
+++ b/cu29/payload/index.html
@@ -1 +1 @@
-cu29::payload - Rust

Module payload

Source

Structs§

CuArray
Copper friendly wrapper for a fixed size array.
\ No newline at end of file +cu29::payload - Rust

Module payload

Source

Structs§

CuArray
Copper friendly wrapper for a fixed size array.
\ No newline at end of file diff --git a/cu29/payload/struct.CuArray.html b/cu29/payload/struct.CuArray.html index cbef66b75..3f015e43d 100644 --- a/cu29/payload/struct.CuArray.html +++ b/cu29/payload/struct.CuArray.html @@ -1,4 +1,4 @@ -CuArray in cu29::payload - Rust

Struct CuArray

Source
pub struct CuArray<T, const N: usize> { /* private fields */ }
Expand description

Copper friendly wrapper for a fixed size array.

+CuArray in cu29::payload - Rust

Struct CuArray

Source
pub struct CuArray<T, const N: usize> { /* private fields */ }
Expand description

Copper friendly wrapper for a fixed size array.

Implementations§

Source§

impl<T, const N: usize> CuArray<T, N>

Source

pub fn new() -> CuArray<T, N>

Source

pub fn fill_from_iter<I>(&mut self, iter: I)
where I: IntoIterator<Item = T>,

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn as_slice(&self) -> &[T]

Source

pub fn capacity(&self) -> usize

Trait Implementations§

Source§

impl<T, const N: usize> Clone for CuArray<T, N>
where T: Clone,

Source§

fn clone(&self) -> CuArray<T, N>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, const N: usize> Debug for CuArray<T, N>
where diff --git a/cu29/prelude/attr.copper_runtime.html b/cu29/prelude/attr.copper_runtime.html index 0d96e491b..63b950530 100644 --- a/cu29/prelude/attr.copper_runtime.html +++ b/cu29/prelude/attr.copper_runtime.html @@ -1,4 +1,4 @@ -copper_runtime in cu29::prelude - Rust

Attribute Macro copper_runtime

Source
#[copper_runtime]
Expand description

Adds #[copper_runtime(config = “path”, sim_mode = false/true)] to your application struct to generate the runtime. +copper_runtime in cu29::prelude - Rust

Attribute Macro copper_runtime

Source
#[copper_runtime]
Expand description

Adds #[copper_runtime(config = “path”, sim_mode = false/true)] to your application struct to generate the runtime. if sim_mode is omitted, it is set to false. This will add a “runtime” field to your struct and implement the “new” and “run” methods.

\ No newline at end of file diff --git a/cu29/prelude/config/fn.read_configuration.html b/cu29/prelude/config/fn.read_configuration.html index acd0eb11f..26715baa9 100644 --- a/cu29/prelude/config/fn.read_configuration.html +++ b/cu29/prelude/config/fn.read_configuration.html @@ -1,2 +1,2 @@ -read_configuration in cu29::prelude::config - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a file.

+read_configuration in cu29::prelude::config - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a file.

\ No newline at end of file diff --git a/cu29/prelude/config/fn.read_configuration_str.html b/cu29/prelude/config/fn.read_configuration_str.html index 06b401eb1..232070537 100644 --- a/cu29/prelude/config/fn.read_configuration_str.html +++ b/cu29/prelude/config/fn.read_configuration_str.html @@ -1,4 +1,4 @@ -read_configuration_str in cu29::prelude::config - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(
+read_configuration_str in cu29::prelude::config - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(
     config_content: String,
 ) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a String.

\ No newline at end of file diff --git a/cu29/prelude/config/index.html b/cu29/prelude/config/index.html index e091bdc48..36bd7671d 100644 --- a/cu29/prelude/config/index.html +++ b/cu29/prelude/config/index.html @@ -1,4 +1,4 @@ -cu29::prelude::config - Rust

Module config

Source
Expand description

This module defines the configuration of the copper runtime. +cu29::prelude::config - Rust

Module config

Source
Expand description

This module defines the configuration of the copper runtime. The configuration is a directed graph where nodes are tasks and edges are connections between tasks. The configuration is serialized in the RON format. The configuration is used to generate the runtime code at compile time.

diff --git a/cu29/prelude/config/struct.Cnx.html b/cu29/prelude/config/struct.Cnx.html index 07af51297..0697351a7 100644 --- a/cu29/prelude/config/struct.Cnx.html +++ b/cu29/prelude/config/struct.Cnx.html @@ -1,4 +1,4 @@ -Cnx in cu29::prelude::config - Rust

Struct Cnx

Source
pub struct Cnx {
+Cnx in cu29::prelude::config - Rust

Struct Cnx

Source
pub struct Cnx {
     pub msg: String,
     pub batch: Option<u32>,
     pub store: Option<bool>,
diff --git a/cu29/prelude/config/struct.ComponentConfig.html b/cu29/prelude/config/struct.ComponentConfig.html
index 65f4f72bf..f08bdb826 100644
--- a/cu29/prelude/config/struct.ComponentConfig.html
+++ b/cu29/prelude/config/struct.ComponentConfig.html
@@ -1,4 +1,4 @@
-ComponentConfig in cu29::prelude::config - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w +ComponentConfig in cu29::prelude::config - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w It is a map of key-value pairs. It is given to the new method of the task implementation.

Tuple Fields§

§0: HashMap<String, Value>

Implementations§

Source§

impl ComponentConfig

Source

pub fn new() -> ComponentConfig

Source

pub fn get<T>(&self, key: &str) -> Option<T>
where diff --git a/cu29/prelude/config/struct.CuConfig.html b/cu29/prelude/config/struct.CuConfig.html index 16fa37f62..93d70fa7e 100644 --- a/cu29/prelude/config/struct.CuConfig.html +++ b/cu29/prelude/config/struct.CuConfig.html @@ -1,4 +1,4 @@ -CuConfig in cu29::prelude::config - Rust

Struct CuConfig

Source
pub struct CuConfig {
+CuConfig in cu29::prelude::config - Rust

Struct CuConfig

Source
pub struct CuConfig {
     pub graph: StableGraph<Node, Cnx>,
     pub monitor: Option<MonitorConfig>,
     pub logging: Option<LoggingConfig>,
diff --git a/cu29/prelude/config/struct.LoggingConfig.html b/cu29/prelude/config/struct.LoggingConfig.html
index 6bd9da0b3..5fa8b0f59 100644
--- a/cu29/prelude/config/struct.LoggingConfig.html
+++ b/cu29/prelude/config/struct.LoggingConfig.html
@@ -1,4 +1,4 @@
-LoggingConfig in cu29::prelude::config - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
+LoggingConfig in cu29::prelude::config - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
     pub slab_size_mib: Option<u64>,
     pub section_size_mib: Option<u64>,
     pub enable_task_logging: bool,
diff --git a/cu29/prelude/config/struct.MonitorConfig.html b/cu29/prelude/config/struct.MonitorConfig.html
index eb671b70a..67eceb185 100644
--- a/cu29/prelude/config/struct.MonitorConfig.html
+++ b/cu29/prelude/config/struct.MonitorConfig.html
@@ -1,4 +1,4 @@
-MonitorConfig in cu29::prelude::config - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Clone for MonitorConfig

Source§

fn clone(&self) -> MonitorConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorConfig

Source§

fn default() -> MonitorConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorConfig

Source§

fn deserialize<__D>( +MonitorConfig in cu29::prelude::config - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Clone for MonitorConfig

Source§

fn clone(&self) -> MonitorConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorConfig

Source§

fn default() -> MonitorConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorConfig

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<MonitorConfig, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for MonitorConfig

Source§

fn serialize<__S>( diff --git a/cu29/prelude/config/struct.Node.html b/cu29/prelude/config/struct.Node.html index 6733324fc..4afaab3d1 100644 --- a/cu29/prelude/config/struct.Node.html +++ b/cu29/prelude/config/struct.Node.html @@ -1,4 +1,4 @@ -Node in cu29::prelude::config - Rust

Struct Node

Source
pub struct Node { /* private fields */ }
Expand description

A node in the configuration graph. +Node in cu29::prelude::config - Rust

Struct Node

Source
pub struct Node { /* private fields */ }
Expand description

A node in the configuration graph. A node represents a Task in the system Graph.

Implementations§

Source§

impl Node

Source

pub fn new(id: &str, ptype: &str) -> Node

Source

pub fn get_id(&self) -> String

Source

pub fn set_type(self, name: Option<String>) -> Node

Source

pub fn get_type(&self) -> &str

Source

pub fn get_instance_config(&self) -> Option<&ComponentConfig>

Source

pub fn get_param<T>(&self, key: &str) -> Option<T>
where T: From<Value>,

Source

pub fn set_param<T>(&mut self, key: &str, value: T)
where diff --git a/cu29/prelude/config/struct.Value.html b/cu29/prelude/config/struct.Value.html index 6948710f2..58dbeaa57 100644 --- a/cu29/prelude/config/struct.Value.html +++ b/cu29/prelude/config/struct.Value.html @@ -1,4 +1,4 @@ -Value in cu29::prelude::config - Rust

Struct Value

Source
pub struct Value(/* private fields */);
Expand description

Wrapper around the ron::Value to allow for custom serialization.

+Value in cu29::prelude::config - Rust

Struct Value

Source
pub struct Value(/* private fields */);
Expand description

Wrapper around the ron::Value to allow for custom serialization.

Trait Implementations§

Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Value

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Value, <__D as Deserializer<'de>>::Error>
where diff --git a/cu29/prelude/config/type.NodeId.html b/cu29/prelude/config/type.NodeId.html index 97aa5d9c6..d0e376621 100644 --- a/cu29/prelude/config/type.NodeId.html +++ b/cu29/prelude/config/type.NodeId.html @@ -1,3 +1,3 @@ -NodeId in cu29::prelude::config - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph +NodeId in cu29::prelude::config - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph and the code generation.

\ No newline at end of file diff --git a/cu29/prelude/constant.ANONYMOUS.html b/cu29/prelude/constant.ANONYMOUS.html index edaca14ea..fad4d5c39 100644 --- a/cu29/prelude/constant.ANONYMOUS.html +++ b/cu29/prelude/constant.ANONYMOUS.html @@ -1 +1 @@ -ANONYMOUS in cu29::prelude - Rust

Constant ANONYMOUS

pub const ANONYMOUS: u32 = 0; // 0u32
\ No newline at end of file +ANONYMOUS in cu29::prelude - Rust

Constant ANONYMOUS

pub const ANONYMOUS: u32 = 0; // 0u32
\ No newline at end of file diff --git a/cu29/prelude/constant.MAX_LOG_PARAMS_ON_STACK.html b/cu29/prelude/constant.MAX_LOG_PARAMS_ON_STACK.html index 2a86ee885..26935f25c 100644 --- a/cu29/prelude/constant.MAX_LOG_PARAMS_ON_STACK.html +++ b/cu29/prelude/constant.MAX_LOG_PARAMS_ON_STACK.html @@ -1 +1 @@ -MAX_LOG_PARAMS_ON_STACK in cu29::prelude - Rust

Constant MAX_LOG_PARAMS_ON_STACK

pub const MAX_LOG_PARAMS_ON_STACK: usize = 10; // 10usize
\ No newline at end of file +MAX_LOG_PARAMS_ON_STACK in cu29::prelude - Rust

Constant MAX_LOG_PARAMS_ON_STACK

pub const MAX_LOG_PARAMS_ON_STACK: usize = 10; // 10usize
\ No newline at end of file diff --git a/cu29/prelude/copperlist/enum.CopperListState.html b/cu29/prelude/copperlist/enum.CopperListState.html index 213952aaa..cc3338867 100644 --- a/cu29/prelude/copperlist/enum.CopperListState.html +++ b/cu29/prelude/copperlist/enum.CopperListState.html @@ -1,4 +1,4 @@ -CopperListState in cu29::prelude::copperlist - Rust

Enum CopperListState

Source
pub enum CopperListState {
+CopperListState in cu29::prelude::copperlist - Rust

Enum CopperListState

Source
pub enum CopperListState {
     Free,
     Initialized,
     Processing,
diff --git a/cu29/prelude/copperlist/index.html b/cu29/prelude/copperlist/index.html
index b644044fd..01106f7af 100644
--- a/cu29/prelude/copperlist/index.html
+++ b/cu29/prelude/copperlist/index.html
@@ -1,4 +1,4 @@
-cu29::prelude::copperlist - Rust

Module copperlist

Source
Expand description

CopperList is the main data structure used by Copper to communicate between tasks. +cu29::prelude::copperlist - Rust

Module copperlist

Source
Expand description

CopperList is the main data structure used by Copper to communicate between tasks. It is a queue that can be used to store preallocated messages between tasks in memory order.

Structs§

CopperLiskMask
Not implemented yet. This mask will be used to for example filter out necessary regions of a copper list between remote systems.
CopperList
CuListsManager
This structure maintains the entire memory needed by Copper for one loop for the inter tasks communication within a process. diff --git a/cu29/prelude/copperlist/struct.CopperLiskMask.html b/cu29/prelude/copperlist/struct.CopperLiskMask.html index a20aedbef..d1434469f 100644 --- a/cu29/prelude/copperlist/struct.CopperLiskMask.html +++ b/cu29/prelude/copperlist/struct.CopperLiskMask.html @@ -1,4 +1,4 @@ -CopperLiskMask in cu29::prelude::copperlist - Rust

Struct CopperLiskMask

Source
pub struct CopperLiskMask { /* private fields */ }
Expand description

Not implemented yet. +CopperLiskMask in cu29::prelude::copperlist - Rust

Struct CopperLiskMask

Source
pub struct CopperLiskMask { /* private fields */ }
Expand description

Not implemented yet. This mask will be used to for example filter out necessary regions of a copper list between remote systems.

Trait Implementations§

Source§

impl<'__de> BorrowDecode<'__de> for CopperLiskMask

Source§

fn borrow_decode<__D>(decoder: &mut __D) -> Result<CopperLiskMask, DecodeError>
where __D: BorrowDecoder<'__de>,

Attempt to decode this type with the given BorrowDecode.
Source§

impl Clone for CopperLiskMask

Source§

fn clone(&self) -> CopperLiskMask

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CopperLiskMask

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Decode for CopperLiskMask

Source§

fn decode<__D>(decoder: &mut __D) -> Result<CopperLiskMask, DecodeError>
where diff --git a/cu29/prelude/copperlist/struct.CopperList.html b/cu29/prelude/copperlist/struct.CopperList.html index 0939a1c69..4f29b6102 100644 --- a/cu29/prelude/copperlist/struct.CopperList.html +++ b/cu29/prelude/copperlist/struct.CopperList.html @@ -1,4 +1,4 @@ -CopperList in cu29::prelude::copperlist - Rust

Struct CopperList

Source
pub struct CopperList<P>
where +CopperList in cu29::prelude::copperlist - Rust

Struct CopperList

Source
pub struct CopperList<P>
where P: CopperListTuple,
{ pub id: u32, pub msgs: P, diff --git a/cu29/prelude/copperlist/struct.CuListsManager.html b/cu29/prelude/copperlist/struct.CuListsManager.html index 770854d69..2ce551d0e 100644 --- a/cu29/prelude/copperlist/struct.CuListsManager.html +++ b/cu29/prelude/copperlist/struct.CuListsManager.html @@ -1,4 +1,4 @@ -CuListsManager in cu29::prelude::copperlist - Rust

Struct CuListsManager

Source
pub struct CuListsManager<P, const N: usize>
where +CuListsManager in cu29::prelude::copperlist - Rust

Struct CuListsManager

Source
pub struct CuListsManager<P, const N: usize>
where P: CopperListTuple,
{ /* private fields */ }
Expand description

This structure maintains the entire memory needed by Copper for one loop for the inter tasks communication within a process. P or Payload is typically a Tuple of various types of messages that are exchanged between tasks. N is the maximum number of in flight Copper List the runtime can support.

diff --git a/cu29/prelude/copperlist/type.AscIter.html b/cu29/prelude/copperlist/type.AscIter.html index 56b560446..f5f807263 100644 --- a/cu29/prelude/copperlist/type.AscIter.html +++ b/cu29/prelude/copperlist/type.AscIter.html @@ -1 +1 @@ -AscIter in cu29::prelude::copperlist - Rust

Type Alias AscIter

Source
pub type AscIter<'a, T> = Chain<Iter<'a, T>, Iter<'a, T>>;

Aliased Type§

struct AscIter<'a, T> { /* private fields */ }
\ No newline at end of file +AscIter in cu29::prelude::copperlist - Rust

Type Alias AscIter

Source
pub type AscIter<'a, T> = Chain<Iter<'a, T>, Iter<'a, T>>;

Aliased Type§

struct AscIter<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/prelude/copperlist/type.AscIterMut.html b/cu29/prelude/copperlist/type.AscIterMut.html index 5285e7b21..4238e1c68 100644 --- a/cu29/prelude/copperlist/type.AscIterMut.html +++ b/cu29/prelude/copperlist/type.AscIterMut.html @@ -1 +1 @@ -AscIterMut in cu29::prelude::copperlist - Rust

Type Alias AscIterMut

Source
pub type AscIterMut<'a, T> = Chain<IterMut<'a, T>, IterMut<'a, T>>;

Aliased Type§

struct AscIterMut<'a, T> { /* private fields */ }
\ No newline at end of file +AscIterMut in cu29::prelude::copperlist - Rust

Type Alias AscIterMut

Source
pub type AscIterMut<'a, T> = Chain<IterMut<'a, T>, IterMut<'a, T>>;

Aliased Type§

struct AscIterMut<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/prelude/copperlist/type.Iter.html b/cu29/prelude/copperlist/type.Iter.html index 1c8c88395..abea680a6 100644 --- a/cu29/prelude/copperlist/type.Iter.html +++ b/cu29/prelude/copperlist/type.Iter.html @@ -1 +1 @@ -Iter in cu29::prelude::copperlist - Rust

Type Alias Iter

Source
pub type Iter<'a, T> = Chain<Rev<Iter<'a, T>>, Rev<Iter<'a, T>>>;

Aliased Type§

struct Iter<'a, T> { /* private fields */ }
\ No newline at end of file +Iter in cu29::prelude::copperlist - Rust

Type Alias Iter

Source
pub type Iter<'a, T> = Chain<Rev<Iter<'a, T>>, Rev<Iter<'a, T>>>;

Aliased Type§

struct Iter<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/prelude/copperlist/type.IterMut.html b/cu29/prelude/copperlist/type.IterMut.html index 5b393aaf3..1d417fc2e 100644 --- a/cu29/prelude/copperlist/type.IterMut.html +++ b/cu29/prelude/copperlist/type.IterMut.html @@ -1 +1 @@ -IterMut in cu29::prelude::copperlist - Rust

Type Alias IterMut

Source
pub type IterMut<'a, T> = Chain<Rev<IterMut<'a, T>>, Rev<IterMut<'a, T>>>;

Aliased Type§

struct IterMut<'a, T> { /* private fields */ }
\ No newline at end of file +IterMut in cu29::prelude::copperlist - Rust

Type Alias IterMut

Source
pub type IterMut<'a, T> = Chain<Rev<IterMut<'a, T>>, Rev<IterMut<'a, T>>>;

Aliased Type§

struct IterMut<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/prelude/curuntime/enum.CuExecutionUnit.html b/cu29/prelude/curuntime/enum.CuExecutionUnit.html index 75a402fea..ae3efec8f 100644 --- a/cu29/prelude/curuntime/enum.CuExecutionUnit.html +++ b/cu29/prelude/curuntime/enum.CuExecutionUnit.html @@ -1,4 +1,4 @@ -CuExecutionUnit in cu29::prelude::curuntime - Rust

Enum CuExecutionUnit

Source
pub enum CuExecutionUnit {
+CuExecutionUnit in cu29::prelude::curuntime - Rust

Enum CuExecutionUnit

Source
pub enum CuExecutionUnit {
     Step(CuExecutionStep),
     Loop(CuExecutionLoop),
 }
Expand description

This structure represents a step in the execution plan.

diff --git a/cu29/prelude/curuntime/enum.CuTaskType.html b/cu29/prelude/curuntime/enum.CuTaskType.html index 82ebc1cac..574d9e59c 100644 --- a/cu29/prelude/curuntime/enum.CuTaskType.html +++ b/cu29/prelude/curuntime/enum.CuTaskType.html @@ -1,4 +1,4 @@ -CuTaskType in cu29::prelude::curuntime - Rust

Enum CuTaskType

Source
pub enum CuTaskType {
+CuTaskType in cu29::prelude::curuntime - Rust

Enum CuTaskType

Source
pub enum CuTaskType {
     Source,
     Regular,
     Sink,
diff --git a/cu29/prelude/curuntime/fn.compute_runtime_plan.html b/cu29/prelude/curuntime/fn.compute_runtime_plan.html
index 17e68e67e..1e9367425 100644
--- a/cu29/prelude/curuntime/fn.compute_runtime_plan.html
+++ b/cu29/prelude/curuntime/fn.compute_runtime_plan.html
@@ -1,4 +1,4 @@
-compute_runtime_plan in cu29::prelude::curuntime - Rust

Function compute_runtime_plan

Source
pub fn compute_runtime_plan(
+compute_runtime_plan in cu29::prelude::curuntime - Rust

Function compute_runtime_plan

Source
pub fn compute_runtime_plan(
     config: &CuConfig,
 ) -> Result<CuExecutionLoop, CuError>
Expand description

This is the main heuristics to compute an execution plan at compilation time. TODO: Make that heuristic pluggable.

diff --git a/cu29/prelude/curuntime/fn.find_task_type_for_id.html b/cu29/prelude/curuntime/fn.find_task_type_for_id.html index 3d23bfae8..c033e8505 100644 --- a/cu29/prelude/curuntime/fn.find_task_type_for_id.html +++ b/cu29/prelude/curuntime/fn.find_task_type_for_id.html @@ -1,4 +1,4 @@ -find_task_type_for_id in cu29::prelude::curuntime - Rust

Function find_task_type_for_id

Source
pub fn find_task_type_for_id(
+find_task_type_for_id in cu29::prelude::curuntime - Rust

Function find_task_type_for_id

Source
pub fn find_task_type_for_id(
     graph: &StableGraph<Node, Cnx>,
     node_id: u32,
 ) -> CuTaskType
\ No newline at end of file diff --git a/cu29/prelude/curuntime/index.html b/cu29/prelude/curuntime/index.html index 72504de63..3e55f96cc 100644 --- a/cu29/prelude/curuntime/index.html +++ b/cu29/prelude/curuntime/index.html @@ -1,4 +1,4 @@ -cu29::prelude::curuntime - Rust

Module curuntime

Source
Expand description

CuRuntime is the heart of what copper is running on the robot. +cu29::prelude::curuntime - Rust

Module curuntime

Source
Expand description

CuRuntime is the heart of what copper is running on the robot. It is exposed to the user via the copper_runtime macro injecting it as a field in their application struct.

Structs§

CopperContext
Just a simple struct to hold the various bits needed to run a Copper application.
CuExecutionLoop
This structure represents a loop in the execution plan. It is used to represent a sequence of Execution units (loop or steps) that are executed diff --git a/cu29/prelude/curuntime/struct.CopperContext.html b/cu29/prelude/curuntime/struct.CopperContext.html index 864ac3712..e3363cecd 100644 --- a/cu29/prelude/curuntime/struct.CopperContext.html +++ b/cu29/prelude/curuntime/struct.CopperContext.html @@ -1,4 +1,4 @@ -CopperContext in cu29::prelude::curuntime - Rust

Struct CopperContext

Source
pub struct CopperContext {
+CopperContext in cu29::prelude::curuntime - Rust

Struct CopperContext

Source
pub struct CopperContext {
     pub unified_logger: Arc<Mutex<UnifiedLoggerWrite>>,
     pub logger_runtime: LoggerRuntime,
     pub clock: RobotClock,
diff --git a/cu29/prelude/curuntime/struct.CuExecutionLoop.html b/cu29/prelude/curuntime/struct.CuExecutionLoop.html
index 85ea4cf2a..e73a994f8 100644
--- a/cu29/prelude/curuntime/struct.CuExecutionLoop.html
+++ b/cu29/prelude/curuntime/struct.CuExecutionLoop.html
@@ -1,4 +1,4 @@
-CuExecutionLoop in cu29::prelude::curuntime - Rust

Struct CuExecutionLoop

Source
pub struct CuExecutionLoop {
+CuExecutionLoop in cu29::prelude::curuntime - Rust

Struct CuExecutionLoop

Source
pub struct CuExecutionLoop {
     pub steps: Vec<CuExecutionUnit>,
     pub loop_count: Option<u32>,
 }
Expand description

This structure represents a loop in the execution plan. diff --git a/cu29/prelude/curuntime/struct.CuExecutionStep.html b/cu29/prelude/curuntime/struct.CuExecutionStep.html index 3d3902c5c..c4480e614 100644 --- a/cu29/prelude/curuntime/struct.CuExecutionStep.html +++ b/cu29/prelude/curuntime/struct.CuExecutionStep.html @@ -1,4 +1,4 @@ -CuExecutionStep in cu29::prelude::curuntime - Rust

Struct CuExecutionStep

Source
pub struct CuExecutionStep {
+CuExecutionStep in cu29::prelude::curuntime - Rust

Struct CuExecutionStep

Source
pub struct CuExecutionStep {
     pub node_id: u32,
     pub node: Node,
     pub task_type: CuTaskType,
diff --git a/cu29/prelude/curuntime/struct.CuRuntime.html b/cu29/prelude/curuntime/struct.CuRuntime.html
index 7ac7f16e4..08215106c 100644
--- a/cu29/prelude/curuntime/struct.CuRuntime.html
+++ b/cu29/prelude/curuntime/struct.CuRuntime.html
@@ -1,4 +1,4 @@
-CuRuntime in cu29::prelude::curuntime - Rust

Struct CuRuntime

Source
pub struct CuRuntime<CT, P, M, const NBCL: usize>
where +CuRuntime in cu29::prelude::curuntime - Rust

Struct CuRuntime

Source
pub struct CuRuntime<CT, P, M, const NBCL: usize>{
     pub tasks: CT,
diff --git a/cu29/prelude/cutask/index.html b/cu29/prelude/cutask/index.html
index f3bf62dac..40e6ba167 100644
--- a/cu29/prelude/cutask/index.html
+++ b/cu29/prelude/cutask/index.html
@@ -1,4 +1,4 @@
-cu29::prelude::cutask - Rust

Module cutask

Source
Expand description

This module contains all the main definition of the traits you need to implement +cu29::prelude::cutask - Rust

Module cutask

Source
Expand description

This module contains all the main definition of the traits you need to implement or interact with to create a Copper task.

Structs§

CuCompactString
CuMsg
CuMsg is the envelope holding the msg payload and the metadata between tasks.
CuMsgMetadata
CuMsgMetadata is a structure that contains metadata common to all CuMsgs.

Traits§

CuMsgPack
CuMsgPayload
CuSinkTask
A Sink Task is a task that only consumes messages. For example drivers for actuators are Sink Tasks.
CuSrcTask
A Src Task is a task that only produces messages. For example drivers for sensors are Src Tasks. They are in push mode from the runtime. diff --git a/cu29/prelude/cutask/struct.CuCompactString.html b/cu29/prelude/cutask/struct.CuCompactString.html index 496788941..73b8b3c9a 100644 --- a/cu29/prelude/cutask/struct.CuCompactString.html +++ b/cu29/prelude/cutask/struct.CuCompactString.html @@ -1,4 +1,4 @@ -CuCompactString in cu29::prelude::cutask - Rust

Struct CuCompactString

Source
pub struct CuCompactString(pub CompactString);

Tuple Fields§

§0: CompactString

Trait Implementations§

Source§

impl<'de> BorrowDecode<'de> for CuCompactString

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<CuCompactString, DecodeError>
where +CuCompactString in cu29::prelude::cutask - Rust

Struct CuCompactString

Source
pub struct CuCompactString(pub CompactString);

Tuple Fields§

§0: CompactString

Trait Implementations§

Source§

impl<'de> BorrowDecode<'de> for CuCompactString

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<CuCompactString, DecodeError>
where D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
Source§

impl Clone for CuCompactString

Source§

fn clone(&self) -> CuCompactString

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CuCompactString

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Decode for CuCompactString

Source§

fn decode<D>(decoder: &mut D) -> Result<CuCompactString, DecodeError>
where D: Decoder,

Attempt to decode this type with the given Decode.
Source§

impl Default for CuCompactString

Source§

fn default() -> CuCompactString

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CuCompactString

Source§

fn deserialize<__D>( __deserializer: __D, diff --git a/cu29/prelude/cutask/struct.CuMsg.html b/cu29/prelude/cutask/struct.CuMsg.html index a166de358..60c062115 100644 --- a/cu29/prelude/cutask/struct.CuMsg.html +++ b/cu29/prelude/cutask/struct.CuMsg.html @@ -1,4 +1,4 @@ -CuMsg in cu29::prelude::cutask - Rust

Struct CuMsg

Source
pub struct CuMsg<T>
where +CuMsg in cu29::prelude::cutask - Rust

Struct CuMsg

Source
pub struct CuMsg<T>
where T: CuMsgPayload,
{ pub metadata: CuMsgMetadata, /* private fields */ diff --git a/cu29/prelude/cutask/struct.CuMsgMetadata.html b/cu29/prelude/cutask/struct.CuMsgMetadata.html index 4997a3b0d..b4f830ca1 100644 --- a/cu29/prelude/cutask/struct.CuMsgMetadata.html +++ b/cu29/prelude/cutask/struct.CuMsgMetadata.html @@ -1,4 +1,4 @@ -CuMsgMetadata in cu29::prelude::cutask - Rust

Struct CuMsgMetadata

Source
pub struct CuMsgMetadata {
+CuMsgMetadata in cu29::prelude::cutask - Rust

Struct CuMsgMetadata

Source
pub struct CuMsgMetadata {
     pub process_time: PartialCuTimeRange,
     pub tov: Tov,
     pub status_txt: CuCompactString,
diff --git a/cu29/prelude/cutask/trait.CuMsgPack.html b/cu29/prelude/cutask/trait.CuMsgPack.html
index 88177e86b..e23989252 100644
--- a/cu29/prelude/cutask/trait.CuMsgPack.html
+++ b/cu29/prelude/cutask/trait.CuMsgPack.html
@@ -1,4 +1,4 @@
-CuMsgPack in cu29::prelude::cutask - Rust

Trait CuMsgPack

Source
pub trait CuMsgPack<'cl> { }

Implementations on Foreign Types§

Source§

impl CuMsgPack<'_> for ()

Source§

impl<'cl, T1, T2> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>)
where +CuMsgPack in cu29::prelude::cutask - Rust

Trait CuMsgPack

Source
pub trait CuMsgPack<'cl> { }

Implementations on Foreign Types§

Source§

impl CuMsgPack<'_> for ()

Source§

impl<'cl, T1, T2> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>)
where T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl,

Source§

impl<'cl, T1, T2, T3> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>, &'cl CuMsg<T3>)
where T1: CuMsgPayload + 'cl, diff --git a/cu29/prelude/cutask/trait.CuMsgPayload.html b/cu29/prelude/cutask/trait.CuMsgPayload.html index a3c98a542..360c3e6e5 100644 --- a/cu29/prelude/cutask/trait.CuMsgPayload.html +++ b/cu29/prelude/cutask/trait.CuMsgPayload.html @@ -1,4 +1,4 @@ -CuMsgPayload in cu29::prelude::cutask - Rust

Trait CuMsgPayload

Source
pub trait CuMsgPayload:
+CuMsgPayload in cu29::prelude::cutask - Rust

Trait CuMsgPayload

Source
pub trait CuMsgPayload:
     Sized
     + Default
     + Debug
diff --git a/cu29/prelude/cutask/trait.CuSinkTask.html b/cu29/prelude/cutask/trait.CuSinkTask.html
index f08c28bdd..1160faaa1 100644
--- a/cu29/prelude/cutask/trait.CuSinkTask.html
+++ b/cu29/prelude/cutask/trait.CuSinkTask.html
@@ -1,4 +1,4 @@
-CuSinkTask in cu29::prelude::cutask - Rust

Trait CuSinkTask

Source
pub trait CuSinkTask<'cl>: Freezable {
+CuSinkTask in cu29::prelude::cutask - Rust

Trait CuSinkTask

Source
pub trait CuSinkTask<'cl>: Freezable {
     type Input: CuMsgPack<'cl>;
 
     // Required methods
diff --git a/cu29/prelude/cutask/trait.CuSrcTask.html b/cu29/prelude/cutask/trait.CuSrcTask.html
index 47250bb28..ff126430f 100644
--- a/cu29/prelude/cutask/trait.CuSrcTask.html
+++ b/cu29/prelude/cutask/trait.CuSrcTask.html
@@ -1,4 +1,4 @@
-CuSrcTask in cu29::prelude::cutask - Rust

Trait CuSrcTask

Source
pub trait CuSrcTask<'cl>: Freezable {
+CuSrcTask in cu29::prelude::cutask - Rust

Trait CuSrcTask

Source
pub trait CuSrcTask<'cl>: Freezable {
     type Output: CuMsgPack<'cl>;
 
     // Required methods
diff --git a/cu29/prelude/cutask/trait.CuTask.html b/cu29/prelude/cutask/trait.CuTask.html
index cb278cd54..20bbf1bfd 100644
--- a/cu29/prelude/cutask/trait.CuTask.html
+++ b/cu29/prelude/cutask/trait.CuTask.html
@@ -1,4 +1,4 @@
-CuTask in cu29::prelude::cutask - Rust

Trait CuTask

Source
pub trait CuTask<'cl>: Freezable {
+CuTask in cu29::prelude::cutask - Rust

Trait CuTask

Source
pub trait CuTask<'cl>: Freezable {
     type Input: CuMsgPack<'cl>;
     type Output: CuMsgPack<'cl>;
 
diff --git a/cu29/prelude/cutask/trait.Freezable.html b/cu29/prelude/cutask/trait.Freezable.html
index 19c172305..e52cc7206 100644
--- a/cu29/prelude/cutask/trait.Freezable.html
+++ b/cu29/prelude/cutask/trait.Freezable.html
@@ -1,4 +1,4 @@
-Freezable in cu29::prelude::cutask - Rust

Trait Freezable

Source
pub trait Freezable {
+Freezable in cu29::prelude::cutask - Rust

Trait Freezable

Source
pub trait Freezable {
     // Provided methods
     fn freeze<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
        where E: Encoder { ... }
diff --git a/cu29/prelude/enum.AllocatedSection.html b/cu29/prelude/enum.AllocatedSection.html
index d0594f829..53da7cdae 100644
--- a/cu29/prelude/enum.AllocatedSection.html
+++ b/cu29/prelude/enum.AllocatedSection.html
@@ -1,4 +1,4 @@
-AllocatedSection in cu29::prelude - Rust

Enum AllocatedSection

pub enum AllocatedSection {
+AllocatedSection in cu29::prelude - Rust

Enum AllocatedSection

pub enum AllocatedSection {
     NoMoreSpace,
     Section(SectionHandle),
 }

Variants§

§

NoMoreSpace

§

Section(SectionHandle)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where diff --git a/cu29/prelude/enum.CopperListState.html b/cu29/prelude/enum.CopperListState.html index f5599e7ee..82812099e 100644 --- a/cu29/prelude/enum.CopperListState.html +++ b/cu29/prelude/enum.CopperListState.html @@ -1,4 +1,4 @@ -CopperListState in cu29::prelude - Rust

Enum CopperListState

Source
pub enum CopperListState {
+CopperListState in cu29::prelude - Rust

Enum CopperListState

Source
pub enum CopperListState {
     Free,
     Initialized,
     Processing,
diff --git a/cu29/prelude/enum.CuExecutionUnit.html b/cu29/prelude/enum.CuExecutionUnit.html
index fe2e78356..c099c8ae9 100644
--- a/cu29/prelude/enum.CuExecutionUnit.html
+++ b/cu29/prelude/enum.CuExecutionUnit.html
@@ -1,4 +1,4 @@
-CuExecutionUnit in cu29::prelude - Rust

Enum CuExecutionUnit

Source
pub enum CuExecutionUnit {
+CuExecutionUnit in cu29::prelude - Rust

Enum CuExecutionUnit

Source
pub enum CuExecutionUnit {
     Step(CuExecutionStep),
     Loop(CuExecutionLoop),
 }
Expand description

This structure represents a step in the execution plan.

diff --git a/cu29/prelude/enum.CuHandleInner.html b/cu29/prelude/enum.CuHandleInner.html index c1c865cbd..4f6db5785 100644 --- a/cu29/prelude/enum.CuHandleInner.html +++ b/cu29/prelude/enum.CuHandleInner.html @@ -1,4 +1,4 @@ -CuHandleInner in cu29::prelude - Rust

Enum CuHandleInner

Source
pub enum CuHandleInner<T>
where +CuHandleInner in cu29::prelude - Rust

Enum CuHandleInner

Source
pub enum CuHandleInner<T>
where T: Debug,
{ Pooled(ReusableOwned<T>), Detached(T), diff --git a/cu29/prelude/enum.CuTaskCallbackState.html b/cu29/prelude/enum.CuTaskCallbackState.html index 033d8d5c6..c78da41ed 100644 --- a/cu29/prelude/enum.CuTaskCallbackState.html +++ b/cu29/prelude/enum.CuTaskCallbackState.html @@ -1,4 +1,4 @@ -CuTaskCallbackState in cu29::prelude - Rust

Enum CuTaskCallbackState

Source
pub enum CuTaskCallbackState<'cl, I, O>
where +CuTaskCallbackState in cu29::prelude - Rust

Enum CuTaskCallbackState

Source
pub enum CuTaskCallbackState<'cl, I, O>
where I: CuMsgPack<'cl>, O: CuMsgPack<'cl>,
{ New(Option<ComponentConfig>), diff --git a/cu29/prelude/enum.CuTaskState.html b/cu29/prelude/enum.CuTaskState.html index 4974006ad..d2977a5f1 100644 --- a/cu29/prelude/enum.CuTaskState.html +++ b/cu29/prelude/enum.CuTaskState.html @@ -1,4 +1,4 @@ -CuTaskState in cu29::prelude - Rust

Enum CuTaskState

Source
pub enum CuTaskState {
+CuTaskState in cu29::prelude - Rust

Enum CuTaskState

Source
pub enum CuTaskState {
     Start,
     Preprocess,
     Process,
diff --git a/cu29/prelude/enum.CuTaskType.html b/cu29/prelude/enum.CuTaskType.html
index bdfb47be3..1d94072ff 100644
--- a/cu29/prelude/enum.CuTaskType.html
+++ b/cu29/prelude/enum.CuTaskType.html
@@ -1,4 +1,4 @@
-CuTaskType in cu29::prelude - Rust

Enum CuTaskType

Source
pub enum CuTaskType {
+CuTaskType in cu29::prelude - Rust

Enum CuTaskType

Source
pub enum CuTaskType {
     Source,
     Regular,
     Sink,
diff --git a/cu29/prelude/enum.Decision.html b/cu29/prelude/enum.Decision.html
index 377c52b7a..60f86b573 100644
--- a/cu29/prelude/enum.Decision.html
+++ b/cu29/prelude/enum.Decision.html
@@ -1,4 +1,4 @@
-Decision in cu29::prelude - Rust

Enum Decision

Source
pub enum Decision {
+Decision in cu29::prelude - Rust

Enum Decision

Source
pub enum Decision {
     Abort,
     Ignore,
     Shutdown,
diff --git a/cu29/prelude/enum.SimOverride.html b/cu29/prelude/enum.SimOverride.html
index 6d082e1d5..c9220e861 100644
--- a/cu29/prelude/enum.SimOverride.html
+++ b/cu29/prelude/enum.SimOverride.html
@@ -1,4 +1,4 @@
-SimOverride in cu29::prelude - Rust

Enum SimOverride

Source
pub enum SimOverride {
+SimOverride in cu29::prelude - Rust

Enum SimOverride

Source
pub enum SimOverride {
     ExecutedBySim,
     ExecuteByRuntime,
     Errored(String),
diff --git a/cu29/prelude/enum.Tov.html b/cu29/prelude/enum.Tov.html
index b398badde..1497657e5 100644
--- a/cu29/prelude/enum.Tov.html
+++ b/cu29/prelude/enum.Tov.html
@@ -1,4 +1,4 @@
-Tov in cu29::prelude - Rust

Enum Tov

pub enum Tov {
+Tov in cu29::prelude - Rust

Enum Tov

pub enum Tov {
     None,
     Time(CuDuration),
     Range(CuTimeRange),
diff --git a/cu29/prelude/enum.UnifiedLogType.html b/cu29/prelude/enum.UnifiedLogType.html
index 620d8e907..318ccb505 100644
--- a/cu29/prelude/enum.UnifiedLogType.html
+++ b/cu29/prelude/enum.UnifiedLogType.html
@@ -1,4 +1,4 @@
-UnifiedLogType in cu29::prelude - Rust

Enum UnifiedLogType

pub enum UnifiedLogType {
+UnifiedLogType in cu29::prelude - Rust

Enum UnifiedLogType

pub enum UnifiedLogType {
     Empty,
     StructuredLogLine,
     CopperList,
diff --git a/cu29/prelude/enum.UnifiedLogger.html b/cu29/prelude/enum.UnifiedLogger.html
index 93233a13b..44a93ef92 100644
--- a/cu29/prelude/enum.UnifiedLogger.html
+++ b/cu29/prelude/enum.UnifiedLogger.html
@@ -1,4 +1,4 @@
-UnifiedLogger in cu29::prelude - Rust

Enum UnifiedLogger

pub enum UnifiedLogger {
+UnifiedLogger in cu29::prelude - Rust

Enum UnifiedLogger

pub enum UnifiedLogger {
     Read(UnifiedLoggerRead),
     Write(UnifiedLoggerWrite),
 }
Expand description

Holder of the read or write side of the datalogger.

diff --git a/cu29/prelude/enum.Value.html b/cu29/prelude/enum.Value.html index 5f13ae3dd..ce03ddb43 100644 --- a/cu29/prelude/enum.Value.html +++ b/cu29/prelude/enum.Value.html @@ -1,4 +1,4 @@ -Value in cu29::prelude - Rust

Enum Value

Source
pub enum Value {
+Value in cu29::prelude - Rust

Enum Value

Source
pub enum Value {
 
Show 20 variants Bool(bool), U8(u8), U16(u16), @@ -179,13 +179,13 @@ E: Encoder,

Encode a given type.

Source§

impl Hash for Value

Source§

fn hash<H>(&self, hasher: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoDeserializer<'_, DeserializerError> for Value

Source§

type Deserializer = Value

The type of the deserializer being converted into.
Source§

fn into_deserializer(self) -> Value

Convert this value into a deserializer.
Source§

impl Ord for Value

Source§

fn cmp(&self, rhs: &Value) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoDeserializer<'_, DeserializerError> for Value

Source§

type Deserializer = Value

The type of the deserializer being converted into.
Source§

fn into_deserializer(self) -> Value

Convert this value into a deserializer.
Source§

impl Ord for Value

Source§

fn cmp(&self, rhs: &Value) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Value

Source§

fn eq(&self, rhs: &Value) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl PartialOrd for Value

Source§

fn partial_cmp(&self, rhs: &Value) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > -operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +and should not be overridden without very good reason.
Source§

impl PartialOrd for Value

Source§

fn partial_cmp(&self, rhs: &Value) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Value

Source§

fn serialize<S>( &self, s: S, diff --git a/cu29/prelude/fn.compute_runtime_plan.html b/cu29/prelude/fn.compute_runtime_plan.html index 807bc8e1b..7cd52c11b 100644 --- a/cu29/prelude/fn.compute_runtime_plan.html +++ b/cu29/prelude/fn.compute_runtime_plan.html @@ -1,4 +1,4 @@ -compute_runtime_plan in cu29::prelude - Rust

Function compute_runtime_plan

Source
pub fn compute_runtime_plan(
+compute_runtime_plan in cu29::prelude - Rust

Function compute_runtime_plan

Source
pub fn compute_runtime_plan(
     config: &CuConfig,
 ) -> Result<CuExecutionLoop, CuError>
Expand description

This is the main heuristics to compute an execution plan at compilation time. TODO: Make that heuristic pluggable.

diff --git a/cu29/prelude/fn.default_log_index_dir.html b/cu29/prelude/fn.default_log_index_dir.html index a2503fa5b..3f54b32e0 100644 --- a/cu29/prelude/fn.default_log_index_dir.html +++ b/cu29/prelude/fn.default_log_index_dir.html @@ -1,2 +1,2 @@ -default_log_index_dir in cu29::prelude - Rust

Function default_log_index_dir

pub fn default_log_index_dir() -> PathBuf
Expand description

Convenience function to returns the default path for the log index directory.

+default_log_index_dir in cu29::prelude - Rust

Function default_log_index_dir

pub fn default_log_index_dir() -> PathBuf
Expand description

Convenience function to returns the default path for the log index directory.

\ No newline at end of file diff --git a/cu29/prelude/fn.find_task_type_for_id.html b/cu29/prelude/fn.find_task_type_for_id.html index 5ddec1b5e..afd4943d2 100644 --- a/cu29/prelude/fn.find_task_type_for_id.html +++ b/cu29/prelude/fn.find_task_type_for_id.html @@ -1,4 +1,4 @@ -find_task_type_for_id in cu29::prelude - Rust

Function find_task_type_for_id

Source
pub fn find_task_type_for_id(
+find_task_type_for_id in cu29::prelude - Rust

Function find_task_type_for_id

Source
pub fn find_task_type_for_id(
     graph: &StableGraph<Node, Cnx>,
     node_id: u32,
 ) -> CuTaskType
\ No newline at end of file diff --git a/cu29/prelude/fn.format_logline.html b/cu29/prelude/fn.format_logline.html index d18a86e0c..cef5f3481 100644 --- a/cu29/prelude/fn.format_logline.html +++ b/cu29/prelude/fn.format_logline.html @@ -1,4 +1,4 @@ -format_logline in cu29::prelude - Rust

Function format_logline

pub fn format_logline(
+format_logline in cu29::prelude - Rust

Function format_logline

pub fn format_logline(
     time: CuDuration,
     format_str: &str,
     params: &[String],
diff --git a/cu29/prelude/fn.log.html b/cu29/prelude/fn.log.html
index 70b746237..fde27490d 100644
--- a/cu29/prelude/fn.log.html
+++ b/cu29/prelude/fn.log.html
@@ -1,3 +1,3 @@
-log in cu29::prelude - Rust

Function log

pub fn log(entry: &mut CuLogEntry) -> Result<(), CuError>
Expand description

Function called from generated code to log data. +log in cu29::prelude - Rust

Function log

pub fn log(entry: &mut CuLogEntry) -> Result<(), CuError>
Expand description

Function called from generated code to log data. It moves entry by design, it will be absorbed in the queue.

\ No newline at end of file diff --git a/cu29/prelude/fn.log_debug_mode.html b/cu29/prelude/fn.log_debug_mode.html index 6ee6f9bcc..7975ad4d7 100644 --- a/cu29/prelude/fn.log_debug_mode.html +++ b/cu29/prelude/fn.log_debug_mode.html @@ -1,4 +1,4 @@ -log_debug_mode in cu29::prelude - Rust

Function log_debug_mode

pub fn log_debug_mode(
+log_debug_mode in cu29::prelude - Rust

Function log_debug_mode

pub fn log_debug_mode(
     entry: &mut CuLogEntry,
     format_str: &str,
     param_names: &[&str],
diff --git a/cu29/prelude/fn.pools_statistics.html b/cu29/prelude/fn.pools_statistics.html
index 4578f86c7..26ee2942d 100644
--- a/cu29/prelude/fn.pools_statistics.html
+++ b/cu29/prelude/fn.pools_statistics.html
@@ -1,3 +1,3 @@
-pools_statistics in cu29::prelude - Rust

Function pools_statistics

Source
pub fn pools_statistics() -> SmallVec<[(ArrayString<64>, usize, usize, usize); 16]>
Expand description

Get the list of pools and their statistics. +pools_statistics in cu29::prelude - Rust

Function pools_statistics

Source
pub fn pools_statistics() -> SmallVec<[(ArrayString<64>, usize, usize, usize); 16]>
Expand description

Get the list of pools and their statistics. We use SmallVec here to avoid heap allocations while the stack is running.

\ No newline at end of file diff --git a/cu29/prelude/fn.read_configuration.html b/cu29/prelude/fn.read_configuration.html index 0b94b2bd1..83375a4d2 100644 --- a/cu29/prelude/fn.read_configuration.html +++ b/cu29/prelude/fn.read_configuration.html @@ -1,2 +1,2 @@ -read_configuration in cu29::prelude - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a file.

+read_configuration in cu29::prelude - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a file.

\ No newline at end of file diff --git a/cu29/prelude/fn.read_configuration_str.html b/cu29/prelude/fn.read_configuration_str.html index d78ed1de8..50d0177f0 100644 --- a/cu29/prelude/fn.read_configuration_str.html +++ b/cu29/prelude/fn.read_configuration_str.html @@ -1,4 +1,4 @@ -read_configuration_str in cu29::prelude - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(
+read_configuration_str in cu29::prelude - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(
     config_content: String,
 ) -> Result<CuConfig, CuError>
Expand description

Read a copper configuration from a String.

\ No newline at end of file diff --git a/cu29/prelude/fn.read_interned_strings.html b/cu29/prelude/fn.read_interned_strings.html index 2c8b78f05..3c3cc8016 100644 --- a/cu29/prelude/fn.read_interned_strings.html +++ b/cu29/prelude/fn.read_interned_strings.html @@ -1,2 +1,2 @@ -read_interned_strings in cu29::prelude - Rust

Function read_interned_strings

pub fn read_interned_strings(index: &Path) -> Result<Vec<String>, CuError>
Expand description

Rebuild the interned string index in memory.

+read_interned_strings in cu29::prelude - Rust

Function read_interned_strings

pub fn read_interned_strings(index: &Path) -> Result<Vec<String>, CuError>
Expand description

Rebuild the interned string index in memory.

\ No newline at end of file diff --git a/cu29/prelude/fn.rebuild_logline.html b/cu29/prelude/fn.rebuild_logline.html index 6fb745ec4..578a98f3a 100644 --- a/cu29/prelude/fn.rebuild_logline.html +++ b/cu29/prelude/fn.rebuild_logline.html @@ -1,4 +1,4 @@ -rebuild_logline in cu29::prelude - Rust

Function rebuild_logline

pub fn rebuild_logline(
+rebuild_logline in cu29::prelude - Rust

Function rebuild_logline

pub fn rebuild_logline(
     all_interned_strings: &[String],
     entry: &CuLogEntry,
 ) -> Result<String, CuError>
Expand description

Rebuild a log line from the interned strings and the CuLogEntry. diff --git a/cu29/prelude/fn.stream_write.html b/cu29/prelude/fn.stream_write.html index 9335549d7..d9f9df584 100644 --- a/cu29/prelude/fn.stream_write.html +++ b/cu29/prelude/fn.stream_write.html @@ -1,4 +1,4 @@ -stream_write in cu29::prelude - Rust

Function stream_write

pub fn stream_write<E>(
+stream_write in cu29::prelude - Rust

Function stream_write

pub fn stream_write<E>(
     logger: Arc<Mutex<UnifiedLoggerWrite>>,
     entry_type: UnifiedLogType,
     minimum_allocation_amount: usize,
diff --git a/cu29/prelude/fn.to_value.html b/cu29/prelude/fn.to_value.html
index e24ff351e..f8c219090 100644
--- a/cu29/prelude/fn.to_value.html
+++ b/cu29/prelude/fn.to_value.html
@@ -1,2 +1,2 @@
-to_value in cu29::prelude - Rust

Function to_value

Source
pub fn to_value<T>(value: T) -> Result<Value, SerializerError>
where +to_value in cu29::prelude - Rust

Function to_value

Source
pub fn to_value<T>(value: T) -> Result<Value, SerializerError>
where T: Serialize,
\ No newline at end of file diff --git a/cu29/prelude/index.html b/cu29/prelude/index.html index c28aef5da..d07db5a89 100644 --- a/cu29/prelude/index.html +++ b/cu29/prelude/index.html @@ -1,4 +1,4 @@ -cu29::prelude - Rust

Module prelude

Source

Modules§

config
This module defines the configuration of the copper runtime. +cu29::prelude - Rust

Module prelude

Source

Modules§

config
This module defines the configuration of the copper runtime. The configuration is a directed graph where nodes are tasks and edges are connections between tasks. The configuration is serialized in the RON format. The configuration is used to generate the runtime code at compile time.
copperlist
CopperList is the main data structure used by Copper to communicate between tasks. diff --git a/cu29/prelude/macro.debug.html b/cu29/prelude/macro.debug.html index f20a9da19..2da6d33d2 100644 --- a/cu29/prelude/macro.debug.html +++ b/cu29/prelude/macro.debug.html @@ -1,4 +1,4 @@ -debug in cu29::prelude - Rust

Macro debug

Source
debug!() { /* proc-macro */ }
Expand description

This macro is used to log a message with parameters. +debug in cu29::prelude - Rust

Macro debug

Source
debug!() { /* proc-macro */ }
Expand description

This macro is used to log a message with parameters. The first parameter is a string literal that represents the message to be logged. Only {} is supported as a placeholder for parameters. The rest of the parameters are the values to be logged. diff --git a/cu29/prelude/macro.gen_cumsgs.html b/cu29/prelude/macro.gen_cumsgs.html index 681d9cd8f..1e624c1d5 100644 --- a/cu29/prelude/macro.gen_cumsgs.html +++ b/cu29/prelude/macro.gen_cumsgs.html @@ -1,4 +1,4 @@ -gen_cumsgs in cu29::prelude - Rust

Macro gen_cumsgs

Source
gen_cumsgs!() { /* proc-macro */ }
Expand description

Generates the CopperList content type from a config. +gen_cumsgs in cu29::prelude - Rust

Macro gen_cumsgs

Source
gen_cumsgs!() { /* proc-macro */ }
Expand description

Generates the CopperList content type from a config. gen_cumsgs!(“path/to/config.toml”) It will create a new type called CuMsgs you can pass to the log reader for decoding:

\ No newline at end of file diff --git a/cu29/prelude/macro.input_msg.html b/cu29/prelude/macro.input_msg.html index b99dd585e..e1d869926 100644 --- a/cu29/prelude/macro.input_msg.html +++ b/cu29/prelude/macro.input_msg.html @@ -1,4 +1,4 @@ -input_msg in cu29::prelude - Rust

Macro input_msg

Source
macro_rules! input_msg {
+input_msg in cu29::prelude - Rust

Macro input_msg

Source
macro_rules! input_msg {
     ($lifetime:lifetime, $ty:ty) => { ... };
     ($lifetime:lifetime, $($ty:ty),*) => { ... };
 }
\ No newline at end of file diff --git a/cu29/prelude/macro.output_msg.html b/cu29/prelude/macro.output_msg.html index 8c38852dd..f9f207711 100644 --- a/cu29/prelude/macro.output_msg.html +++ b/cu29/prelude/macro.output_msg.html @@ -1,3 +1,3 @@ -output_msg in cu29::prelude - Rust

Macro output_msg

Source
macro_rules! output_msg {
+output_msg in cu29::prelude - Rust

Macro output_msg

Source
macro_rules! output_msg {
     ($lifetime:lifetime, $ty:ty) => { ... };
 }
\ No newline at end of file diff --git a/cu29/prelude/monitoring/enum.CuTaskState.html b/cu29/prelude/monitoring/enum.CuTaskState.html index bd2a0a9c0..c54d2dbb7 100644 --- a/cu29/prelude/monitoring/enum.CuTaskState.html +++ b/cu29/prelude/monitoring/enum.CuTaskState.html @@ -1,4 +1,4 @@ -CuTaskState in cu29::prelude::monitoring - Rust

Enum CuTaskState

Source
pub enum CuTaskState {
+CuTaskState in cu29::prelude::monitoring - Rust

Enum CuTaskState

Source
pub enum CuTaskState {
     Start,
     Preprocess,
     Process,
diff --git a/cu29/prelude/monitoring/enum.Decision.html b/cu29/prelude/monitoring/enum.Decision.html
index 42d216cdc..00187b18b 100644
--- a/cu29/prelude/monitoring/enum.Decision.html
+++ b/cu29/prelude/monitoring/enum.Decision.html
@@ -1,4 +1,4 @@
-Decision in cu29::prelude::monitoring - Rust

Enum Decision

Source
pub enum Decision {
+Decision in cu29::prelude::monitoring - Rust

Enum Decision

Source
pub enum Decision {
     Abort,
     Ignore,
     Shutdown,
diff --git a/cu29/prelude/monitoring/index.html b/cu29/prelude/monitoring/index.html
index 791150ad8..e4de00c51 100644
--- a/cu29/prelude/monitoring/index.html
+++ b/cu29/prelude/monitoring/index.html
@@ -1,4 +1,4 @@
-cu29::prelude::monitoring - Rust

Module monitoring

Source
Expand description

Some basic internal monitoring tooling Copper uses to monitor itself and the tasks it is running.

+cu29::prelude::monitoring - Rust

Module monitoring

Source
Expand description

Some basic internal monitoring tooling Copper uses to monitor itself and the tasks it is running.

Structs§

CountingAllocator
A simple allocator that counts the number of bytes allocated and deallocated.
CuDurationStatistics
A Specialized statistics object for CuDuration. It will also keep track of the jitter between the values.
LiveStatistics
Accumulative stat object that can give your some real time statistics.
NoMonitor
A do nothing monitor if no monitor is provided. This is basically defining the default behavior of Copper in case of error.
ScopedAllocCounter
A simple struct that counts the number of bytes allocated and deallocated in a scope.

Enums§

CuTaskState
The state of a task.
Decision
Monitor decision to be taken when a task errored out.

Statics§

GLOBAL

Traits§

CuMonitor
Trait to implement a monitoring task.
\ No newline at end of file diff --git a/cu29/prelude/monitoring/static.GLOBAL.html b/cu29/prelude/monitoring/static.GLOBAL.html index a9c2832ad..071f8b99b 100644 --- a/cu29/prelude/monitoring/static.GLOBAL.html +++ b/cu29/prelude/monitoring/static.GLOBAL.html @@ -1 +1 @@ -GLOBAL in cu29::prelude::monitoring - Rust

Static GLOBAL

Source
pub static GLOBAL: CountingAllocator
\ No newline at end of file +GLOBAL in cu29::prelude::monitoring - Rust

Static GLOBAL

Source
pub static GLOBAL: CountingAllocator
\ No newline at end of file diff --git a/cu29/prelude/monitoring/struct.CountingAllocator.html b/cu29/prelude/monitoring/struct.CountingAllocator.html index 2b673439f..56749fcba 100644 --- a/cu29/prelude/monitoring/struct.CountingAllocator.html +++ b/cu29/prelude/monitoring/struct.CountingAllocator.html @@ -1,4 +1,4 @@ -CountingAllocator in cu29::prelude::monitoring - Rust

Struct CountingAllocator

Source
pub struct CountingAllocator { /* private fields */ }
Expand description

A simple allocator that counts the number of bytes allocated and deallocated.

+CountingAllocator in cu29::prelude::monitoring - Rust

Struct CountingAllocator

Source
pub struct CountingAllocator { /* private fields */ }
Expand description

A simple allocator that counts the number of bytes allocated and deallocated.

Implementations§

Trait Implementations§

Source§

impl Default for CountingAllocator

Source§

fn default() -> CountingAllocator

Returns the “default value” for a type. Read more
Source§

impl GlobalAlloc for CountingAllocator

Source§

unsafe fn alloc(&self, layout: Layout) -> *mut u8

Allocates memory as described by the given layout. Read more
Source§

unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout)

Deallocates the block of memory at the given ptr pointer with the given layout. Read more
1.28.0 · Source§

unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8

Behaves like alloc, but also ensures that the contents are set to zero before being returned. Read more
1.28.0 · Source§

unsafe fn realloc( &self, diff --git a/cu29/prelude/monitoring/struct.CuDurationStatistics.html b/cu29/prelude/monitoring/struct.CuDurationStatistics.html index cd60ce043..35b72dee9 100644 --- a/cu29/prelude/monitoring/struct.CuDurationStatistics.html +++ b/cu29/prelude/monitoring/struct.CuDurationStatistics.html @@ -1,4 +1,4 @@ -CuDurationStatistics in cu29::prelude::monitoring - Rust

Struct CuDurationStatistics

Source
pub struct CuDurationStatistics { /* private fields */ }
Expand description

A Specialized statistics object for CuDuration. +CuDurationStatistics in cu29::prelude::monitoring - Rust

Struct CuDurationStatistics

Source
pub struct CuDurationStatistics { /* private fields */ }
Expand description

A Specialized statistics object for CuDuration. It will also keep track of the jitter between the values.

Implementations§

Source§

impl CuDurationStatistics

Source

pub fn new(max: CuDuration) -> CuDurationStatistics

Source

pub fn min(&self) -> CuDuration

Source

pub fn max(&self) -> CuDuration

Source

pub fn mean(&self) -> CuDuration

Source

pub fn percentile(&self, percentile: f64) -> CuDuration

Source

pub fn stddev(&self) -> CuDuration

Source

pub fn len(&self) -> u64

Source

pub fn is_empty(&self) -> bool

Source

pub fn jitter_min(&self) -> CuDuration

Source

pub fn jitter_max(&self) -> CuDuration

Source

pub fn jitter_mean(&self) -> CuDuration

Source

pub fn jitter_stddev(&self) -> CuDuration

Source

pub fn jitter_percentile(&self, percentile: f64) -> CuDuration

Source

pub fn record(&mut self, value: CuDuration)

Source

pub fn reset(&mut self)

Trait Implementations§

Source§

impl Clone for CuDurationStatistics

Source§

fn clone(&self) -> CuDurationStatistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CuDurationStatistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29/prelude/monitoring/struct.LiveStatistics.html b/cu29/prelude/monitoring/struct.LiveStatistics.html index 457f399ae..df3d9d5a7 100644 --- a/cu29/prelude/monitoring/struct.LiveStatistics.html +++ b/cu29/prelude/monitoring/struct.LiveStatistics.html @@ -1,4 +1,4 @@ -LiveStatistics in cu29::prelude::monitoring - Rust

Struct LiveStatistics

Source
pub struct LiveStatistics { /* private fields */ }
Expand description

Accumulative stat object that can give your some real time statistics.

+LiveStatistics in cu29::prelude::monitoring - Rust

Struct LiveStatistics

Source
pub struct LiveStatistics { /* private fields */ }
Expand description

Accumulative stat object that can give your some real time statistics.

Implementations§

Source§

impl LiveStatistics

Source

pub fn new_unbounded() -> LiveStatistics

Source

pub fn new_with_max(max: u64) -> LiveStatistics

Source

pub fn min(&self) -> u64

Source

pub fn max(&self) -> u64

Source

pub fn mean(&self) -> f64

Source

pub fn percentile(&self, percentile: f64) -> u64

Source

pub fn record(&mut self, value: u64)

Adds a value to the statistics.

Source

pub fn len(&self) -> u64

Source

pub fn is_empty(&self) -> bool

Source

pub fn reset(&mut self)

Trait Implementations§

Source§

impl Clone for LiveStatistics

Source§

fn clone(&self) -> LiveStatistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LiveStatistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29/prelude/monitoring/struct.NoMonitor.html b/cu29/prelude/monitoring/struct.NoMonitor.html index 02111140e..0459632bb 100644 --- a/cu29/prelude/monitoring/struct.NoMonitor.html +++ b/cu29/prelude/monitoring/struct.NoMonitor.html @@ -1,4 +1,4 @@ -NoMonitor in cu29::prelude::monitoring - Rust

Struct NoMonitor

Source
pub struct NoMonitor {}
Expand description

A do nothing monitor if no monitor is provided. +NoMonitor in cu29::prelude::monitoring - Rust

Struct NoMonitor

Source
pub struct NoMonitor {}
Expand description

A do nothing monitor if no monitor is provided. This is basically defining the default behavior of Copper in case of error.

Trait Implementations§

Source§

impl CuMonitor for NoMonitor

Source§

fn new( _config: &CuConfig, diff --git a/cu29/prelude/monitoring/struct.ScopedAllocCounter.html b/cu29/prelude/monitoring/struct.ScopedAllocCounter.html index 863ef0cb4..f21fbff63 100644 --- a/cu29/prelude/monitoring/struct.ScopedAllocCounter.html +++ b/cu29/prelude/monitoring/struct.ScopedAllocCounter.html @@ -1,4 +1,4 @@ -ScopedAllocCounter in cu29::prelude::monitoring - Rust

Struct ScopedAllocCounter

Source
pub struct ScopedAllocCounter { /* private fields */ }
Expand description

A simple struct that counts the number of bytes allocated and deallocated in a scope.

+ScopedAllocCounter in cu29::prelude::monitoring - Rust

Struct ScopedAllocCounter

Source
pub struct ScopedAllocCounter { /* private fields */ }
Expand description

A simple struct that counts the number of bytes allocated and deallocated in a scope.

Implementations§

Source§

impl ScopedAllocCounter

Source

pub fn new() -> ScopedAllocCounter

Source

pub fn get_allocated(&self) -> usize

Returns the total number of bytes allocated in the current scope since the creation of this ScopedAllocCounter.

§Example
diff --git a/cu29/prelude/monitoring/trait.CuMonitor.html b/cu29/prelude/monitoring/trait.CuMonitor.html index 1e40dcf26..415c75e63 100644 --- a/cu29/prelude/monitoring/trait.CuMonitor.html +++ b/cu29/prelude/monitoring/trait.CuMonitor.html @@ -1,4 +1,4 @@ -CuMonitor in cu29::prelude::monitoring - Rust

Trait CuMonitor

Source
pub trait CuMonitor: Sized {
+CuMonitor in cu29::prelude::monitoring - Rust

Trait CuMonitor

Source
pub trait CuMonitor: Sized {
     // Required methods
     fn new(
         config: &CuConfig,
diff --git a/cu29/prelude/payload/index.html b/cu29/prelude/payload/index.html
index b227743ec..4a01c0cbd 100644
--- a/cu29/prelude/payload/index.html
+++ b/cu29/prelude/payload/index.html
@@ -1 +1 @@
-cu29::prelude::payload - Rust

Module payload

Source

Structs§

CuArray
Copper friendly wrapper for a fixed size array.
\ No newline at end of file +cu29::prelude::payload - Rust

Module payload

Source

Structs§

CuArray
Copper friendly wrapper for a fixed size array.
\ No newline at end of file diff --git a/cu29/prelude/payload/struct.CuArray.html b/cu29/prelude/payload/struct.CuArray.html index 0e9cd7cdd..3575d0f15 100644 --- a/cu29/prelude/payload/struct.CuArray.html +++ b/cu29/prelude/payload/struct.CuArray.html @@ -1,4 +1,4 @@ -CuArray in cu29::prelude::payload - Rust

Struct CuArray

Source
pub struct CuArray<T, const N: usize> { /* private fields */ }
Expand description

Copper friendly wrapper for a fixed size array.

+CuArray in cu29::prelude::payload - Rust

Struct CuArray

Source
pub struct CuArray<T, const N: usize> { /* private fields */ }
Expand description

Copper friendly wrapper for a fixed size array.

Implementations§

Source§

impl<T, const N: usize> CuArray<T, N>

Source

pub fn new() -> CuArray<T, N>

Source

pub fn fill_from_iter<I>(&mut self, iter: I)
where I: IntoIterator<Item = T>,

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn as_slice(&self) -> &[T]

Source

pub fn capacity(&self) -> usize

Trait Implementations§

Source§

impl<T, const N: usize> Clone for CuArray<T, N>
where T: Clone,

Source§

fn clone(&self) -> CuArray<T, N>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, const N: usize> Debug for CuArray<T, N>
where diff --git a/cu29/prelude/pool/enum.CuHandleInner.html b/cu29/prelude/pool/enum.CuHandleInner.html index d34c78977..98a30f827 100644 --- a/cu29/prelude/pool/enum.CuHandleInner.html +++ b/cu29/prelude/pool/enum.CuHandleInner.html @@ -1,4 +1,4 @@ -CuHandleInner in cu29::prelude::pool - Rust

Enum CuHandleInner

Source
pub enum CuHandleInner<T>
where +CuHandleInner in cu29::prelude::pool - Rust

Enum CuHandleInner

Source
pub enum CuHandleInner<T>
where T: Debug,
{ Pooled(ReusableOwned<T>), Detached(T), diff --git a/cu29/prelude/pool/fn.pools_statistics.html b/cu29/prelude/pool/fn.pools_statistics.html index b0759e380..7fccf2fba 100644 --- a/cu29/prelude/pool/fn.pools_statistics.html +++ b/cu29/prelude/pool/fn.pools_statistics.html @@ -1,3 +1,3 @@ -pools_statistics in cu29::prelude::pool - Rust

Function pools_statistics

Source
pub fn pools_statistics() -> SmallVec<[(ArrayString<64>, usize, usize, usize); 16]>
Expand description

Get the list of pools and their statistics. +pools_statistics in cu29::prelude::pool - Rust

Function pools_statistics

Source
pub fn pools_statistics() -> SmallVec<[(ArrayString<64>, usize, usize, usize); 16]>
Expand description

Get the list of pools and their statistics. We use SmallVec here to avoid heap allocations while the stack is running.

\ No newline at end of file diff --git a/cu29/prelude/pool/index.html b/cu29/prelude/pool/index.html index 1b0475ce7..ff873df57 100644 --- a/cu29/prelude/pool/index.html +++ b/cu29/prelude/pool/index.html @@ -1,4 +1,4 @@ -cu29::prelude::pool - Rust

Module pool

Source

Structs§

AlignedBuffer
A buffer that is aligned to a specific size with the Element of type E.
CuHandle
A shareable handle to an Array coming from a pool (either host or device).
CuHostMemoryPool
A pool of host memory buffers.

Enums§

CuHandleInner
A Handle to a Buffer. +cu29::prelude::pool - Rust

Module pool

Source

Structs§

AlignedBuffer
A buffer that is aligned to a specific size with the Element of type E.
CuHandle
A shareable handle to an Array coming from a pool (either host or device).
CuHostMemoryPool
A pool of host memory buffers.

Enums§

CuHandleInner
A Handle to a Buffer. For onboard usages, the buffer should be Pooled (ie, coming from a preallocated pool). The Detached version is for offline usages where we don’t really need a pool to deserialize them.

Traits§

ArrayLike
CuPool
A CuPool is a pool of buffers that can be shared between different parts of the code. Handles can be stored locally in the tasks and shared between them.
DeviceCuPool
A device memory pool can copy data from a device to a host memory pool on top.
ElementType
Basic Type that can be used in a buffer in a CuPool.
PoolMonitor
Trait for a Pool to exposed to be monitored by the monitoring API.

Functions§

pools_statistics
Get the list of pools and their statistics. diff --git a/cu29/prelude/pool/struct.AlignedBuffer.html b/cu29/prelude/pool/struct.AlignedBuffer.html index ae9578a95..f0ff86dc7 100644 --- a/cu29/prelude/pool/struct.AlignedBuffer.html +++ b/cu29/prelude/pool/struct.AlignedBuffer.html @@ -1,4 +1,4 @@ -AlignedBuffer in cu29::prelude::pool - Rust

Struct AlignedBuffer

Source
pub struct AlignedBuffer<E>
where +AlignedBuffer in cu29::prelude::pool - Rust

Struct AlignedBuffer

Source
pub struct AlignedBuffer<E>
where E: ElementType,
{ /* private fields */ }
Expand description

A buffer that is aligned to a specific size with the Element of type E.

Implementations§

Source§

impl<E> AlignedBuffer<E>
where E: ElementType,

Source

pub fn new(num_elements: usize, alignment: usize) -> AlignedBuffer<E>

Methods from Deref<Target = [E]>§

Source

pub fn write_copy_of_slice(&mut self, src: &[T]) -> &mut [T]
where diff --git a/cu29/prelude/pool/struct.CuHandle.html b/cu29/prelude/pool/struct.CuHandle.html index 636df844b..50fbdb26b 100644 --- a/cu29/prelude/pool/struct.CuHandle.html +++ b/cu29/prelude/pool/struct.CuHandle.html @@ -1,4 +1,4 @@ -CuHandle in cu29::prelude::pool - Rust

Struct CuHandle

Source
pub struct CuHandle<T>(/* private fields */)
+CuHandle in cu29::prelude::pool - Rust

Struct CuHandle

Source
pub struct CuHandle<T>(/* private fields */)
 where
     T: ArrayLike;
Expand description

A shareable handle to an Array coming from a pool (either host or device).

Implementations§

Source§

impl<T> CuHandle<T>
where diff --git a/cu29/prelude/pool/struct.CuHostMemoryPool.html b/cu29/prelude/pool/struct.CuHostMemoryPool.html index 40b93cb56..c8e506d63 100644 --- a/cu29/prelude/pool/struct.CuHostMemoryPool.html +++ b/cu29/prelude/pool/struct.CuHostMemoryPool.html @@ -1,4 +1,4 @@ -CuHostMemoryPool in cu29::prelude::pool - Rust

Struct CuHostMemoryPool

Source
pub struct CuHostMemoryPool<T> { /* private fields */ }
Expand description

A pool of host memory buffers.

+CuHostMemoryPool in cu29::prelude::pool - Rust

Struct CuHostMemoryPool

Source
pub struct CuHostMemoryPool<T> { /* private fields */ }
Expand description

A pool of host memory buffers.

Implementations§

Source§

impl<T> CuHostMemoryPool<T>
where T: ArrayLike + 'static,

Source

pub fn new<F>( id: &str, diff --git a/cu29/prelude/pool/trait.ArrayLike.html b/cu29/prelude/pool/trait.ArrayLike.html index df3dbf76b..2f89cde6e 100644 --- a/cu29/prelude/pool/trait.ArrayLike.html +++ b/cu29/prelude/pool/trait.ArrayLike.html @@ -1,4 +1,4 @@ -ArrayLike in cu29::prelude::pool - Rust

Trait ArrayLike

Source
pub trait ArrayLike:
+ArrayLike in cu29::prelude::pool - Rust

Trait ArrayLike

Source
pub trait ArrayLike:
     Deref<Target = [Self::Element]>
     + DerefMut
     + Debug
diff --git a/cu29/prelude/pool/trait.CuPool.html b/cu29/prelude/pool/trait.CuPool.html
index 35fd84f84..1a438bb93 100644
--- a/cu29/prelude/pool/trait.CuPool.html
+++ b/cu29/prelude/pool/trait.CuPool.html
@@ -1,4 +1,4 @@
-CuPool in cu29::prelude::pool - Rust

Trait CuPool

Source
pub trait CuPool<T>: PoolMonitor
where +CuPool in cu29::prelude::pool - Rust

Trait CuPool

Source
pub trait CuPool<T>: PoolMonitor
where T: ArrayLike,
{ // Required methods fn acquire(&self) -> Option<CuHandle<T>>; diff --git a/cu29/prelude/pool/trait.DeviceCuPool.html b/cu29/prelude/pool/trait.DeviceCuPool.html index facb9662f..0a27774f1 100644 --- a/cu29/prelude/pool/trait.DeviceCuPool.html +++ b/cu29/prelude/pool/trait.DeviceCuPool.html @@ -1,4 +1,4 @@ -DeviceCuPool in cu29::prelude::pool - Rust

Trait DeviceCuPool

Source
pub trait DeviceCuPool<T>: CuPool<T>
where +DeviceCuPool in cu29::prelude::pool - Rust

Trait DeviceCuPool

Source
pub trait DeviceCuPool<T>: CuPool<T>
where T: ArrayLike,
{ // Required method fn copy_to_host_pool<O>( diff --git a/cu29/prelude/pool/trait.ElementType.html b/cu29/prelude/pool/trait.ElementType.html index 03d513d4d..b188f0a5c 100644 --- a/cu29/prelude/pool/trait.ElementType.html +++ b/cu29/prelude/pool/trait.ElementType.html @@ -1,4 +1,4 @@ -ElementType in cu29::prelude::pool - Rust

Trait ElementType

Source
pub trait ElementType:
+ElementType in cu29::prelude::pool - Rust

Trait ElementType

Source
pub trait ElementType:
     Sized
     + Default
     + Copy
diff --git a/cu29/prelude/pool/trait.PoolMonitor.html b/cu29/prelude/pool/trait.PoolMonitor.html
index e35b675bc..6817cdebd 100644
--- a/cu29/prelude/pool/trait.PoolMonitor.html
+++ b/cu29/prelude/pool/trait.PoolMonitor.html
@@ -1,4 +1,4 @@
-PoolMonitor in cu29::prelude::pool - Rust

Trait PoolMonitor

Source
pub trait PoolMonitor: Send + Sync {
+PoolMonitor in cu29::prelude::pool - Rust

Trait PoolMonitor

Source
pub trait PoolMonitor: Send + Sync {
     // Required methods
     fn id(&self) -> ArrayString<64>;
     fn space_left(&self) -> usize;
diff --git a/cu29/prelude/simulation/enum.CuTaskCallbackState.html b/cu29/prelude/simulation/enum.CuTaskCallbackState.html
index 8275b7a93..62c08bec9 100644
--- a/cu29/prelude/simulation/enum.CuTaskCallbackState.html
+++ b/cu29/prelude/simulation/enum.CuTaskCallbackState.html
@@ -1,4 +1,4 @@
-CuTaskCallbackState in cu29::prelude::simulation - Rust

Enum CuTaskCallbackState

Source
pub enum CuTaskCallbackState<'cl, I, O>
where +CuTaskCallbackState in cu29::prelude::simulation - Rust

Enum CuTaskCallbackState

Source
pub enum CuTaskCallbackState<'cl, I, O>
where I: CuMsgPack<'cl>, O: CuMsgPack<'cl>,
{ New(Option<ComponentConfig>), diff --git a/cu29/prelude/simulation/enum.SimOverride.html b/cu29/prelude/simulation/enum.SimOverride.html index 51158925c..5c0b0b18f 100644 --- a/cu29/prelude/simulation/enum.SimOverride.html +++ b/cu29/prelude/simulation/enum.SimOverride.html @@ -1,4 +1,4 @@ -SimOverride in cu29::prelude::simulation - Rust

Enum SimOverride

Source
pub enum SimOverride {
+SimOverride in cu29::prelude::simulation - Rust

Enum SimOverride

Source
pub enum SimOverride {
     ExecutedBySim,
     ExecuteByRuntime,
     Errored(String),
diff --git a/cu29/prelude/simulation/index.html b/cu29/prelude/simulation/index.html
index 30a0f3d12..e1d67bfc6 100644
--- a/cu29/prelude/simulation/index.html
+++ b/cu29/prelude/simulation/index.html
@@ -1,4 +1,4 @@
-cu29::prelude::simulation - Rust

Module simulation

Source
Expand description

§cu29::simulation Module

+cu29::prelude::simulation - Rust

Module simulation

Source
Expand description

§cu29::simulation Module

The cu29::simulation module provides an interface to simulate tasks in Copper-based systems. It offers structures, traits, and enums that enable hooking into the lifecycle of tasks, adapting their behavior, and integrating them with simulated hardware environments.

diff --git a/cu29/prelude/simulation/struct.CuSimSinkTask.html b/cu29/prelude/simulation/struct.CuSimSinkTask.html index 08ead4b6e..98a63cb70 100644 --- a/cu29/prelude/simulation/struct.CuSimSinkTask.html +++ b/cu29/prelude/simulation/struct.CuSimSinkTask.html @@ -1,4 +1,4 @@ -CuSimSinkTask in cu29::prelude::simulation - Rust

Struct CuSimSinkTask

Source
pub struct CuSimSinkTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a sink task for the simulations. +CuSimSinkTask in cu29::prelude::simulation - Rust

Struct CuSimSinkTask

Source
pub struct CuSimSinkTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a sink task for the simulations. It basically does nothing in place of a real driver so it won’t try to initialize any hardware.

Trait Implementations§

Source§

impl<'cl, T> CuSinkTask<'cl> for CuSimSinkTask<T>
where T: CuMsgPayload + 'cl,

Source§

type Input = &'cl CuMsg<T>

Source§

fn new(_config: Option<&ComponentConfig>) -> Result<CuSimSinkTask<T>, CuError>
where diff --git a/cu29/prelude/simulation/struct.CuSimSrcTask.html b/cu29/prelude/simulation/struct.CuSimSrcTask.html index a17482448..60f71a247 100644 --- a/cu29/prelude/simulation/struct.CuSimSrcTask.html +++ b/cu29/prelude/simulation/struct.CuSimSrcTask.html @@ -1,4 +1,4 @@ -CuSimSrcTask in cu29::prelude::simulation - Rust

Struct CuSimSrcTask

Source
pub struct CuSimSrcTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a source task for the simulations. +CuSimSrcTask in cu29::prelude::simulation - Rust

Struct CuSimSrcTask

Source
pub struct CuSimSrcTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a source task for the simulations. It basically does nothing in place of a real driver so it won’t try to initialize any hardware.

Trait Implementations§

Source§

impl<'cl, T> CuSrcTask<'cl> for CuSimSrcTask<T>
where T: CuMsgPayload + 'cl,

Source§

type Output = &'cl mut CuMsg<T>

Source§

fn new(_config: Option<&ComponentConfig>) -> Result<CuSimSrcTask<T>, CuError>
where diff --git a/cu29/prelude/static.EXTRA_TEXT_LOGGER.html b/cu29/prelude/static.EXTRA_TEXT_LOGGER.html index 7973412ce..0fbc181e2 100644 --- a/cu29/prelude/static.EXTRA_TEXT_LOGGER.html +++ b/cu29/prelude/static.EXTRA_TEXT_LOGGER.html @@ -1 +1 @@ -EXTRA_TEXT_LOGGER in cu29::prelude - Rust

Static EXTRA_TEXT_LOGGER

pub static EXTRA_TEXT_LOGGER: RwLock<Option<Box<dyn Log>>>
\ No newline at end of file +EXTRA_TEXT_LOGGER in cu29::prelude - Rust

Static EXTRA_TEXT_LOGGER

pub static EXTRA_TEXT_LOGGER: RwLock<Option<Box<dyn Log>>>
\ No newline at end of file diff --git a/cu29/prelude/static.GLOBAL.html b/cu29/prelude/static.GLOBAL.html index 060859411..c4462b35f 100644 --- a/cu29/prelude/static.GLOBAL.html +++ b/cu29/prelude/static.GLOBAL.html @@ -1 +1 @@ -GLOBAL in cu29::prelude - Rust

Static GLOBAL

Source
pub static GLOBAL: CountingAllocator
\ No newline at end of file +GLOBAL in cu29::prelude - Rust

Static GLOBAL

Source
pub static GLOBAL: CountingAllocator
\ No newline at end of file diff --git a/cu29/prelude/struct.AlignedBuffer.html b/cu29/prelude/struct.AlignedBuffer.html index e3b8a6fc1..2adb85ae3 100644 --- a/cu29/prelude/struct.AlignedBuffer.html +++ b/cu29/prelude/struct.AlignedBuffer.html @@ -1,4 +1,4 @@ -AlignedBuffer in cu29::prelude - Rust

Struct AlignedBuffer

Source
pub struct AlignedBuffer<E>
where +AlignedBuffer in cu29::prelude - Rust

Struct AlignedBuffer

Source
pub struct AlignedBuffer<E>
where E: ElementType,
{ /* private fields */ }
Expand description

A buffer that is aligned to a specific size with the Element of type E.

Implementations§

Source§

impl<E> AlignedBuffer<E>
where E: ElementType,

Source

pub fn new(num_elements: usize, alignment: usize) -> AlignedBuffer<E>

Methods from Deref<Target = [E]>§

Source

pub fn write_copy_of_slice(&mut self, src: &[T]) -> &mut [T]
where diff --git a/cu29/prelude/struct.Cnx.html b/cu29/prelude/struct.Cnx.html index 37c498bf3..792be2aaa 100644 --- a/cu29/prelude/struct.Cnx.html +++ b/cu29/prelude/struct.Cnx.html @@ -1,4 +1,4 @@ -Cnx in cu29::prelude - Rust

Struct Cnx

Source
pub struct Cnx {
+Cnx in cu29::prelude - Rust

Struct Cnx

Source
pub struct Cnx {
     pub msg: String,
     pub batch: Option<u32>,
     pub store: Option<bool>,
diff --git a/cu29/prelude/struct.ComponentConfig.html b/cu29/prelude/struct.ComponentConfig.html
index 4a543f6b8..e0a3a5aeb 100644
--- a/cu29/prelude/struct.ComponentConfig.html
+++ b/cu29/prelude/struct.ComponentConfig.html
@@ -1,4 +1,4 @@
-ComponentConfig in cu29::prelude - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w +ComponentConfig in cu29::prelude - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w It is a map of key-value pairs. It is given to the new method of the task implementation.

Tuple Fields§

§0: HashMap<String, Value>

Implementations§

Source§

impl ComponentConfig

Source

pub fn new() -> ComponentConfig

Source

pub fn get<T>(&self, key: &str) -> Option<T>
where diff --git a/cu29/prelude/struct.CopperContext.html b/cu29/prelude/struct.CopperContext.html index 045e5e75a..b3f78e238 100644 --- a/cu29/prelude/struct.CopperContext.html +++ b/cu29/prelude/struct.CopperContext.html @@ -1,4 +1,4 @@ -CopperContext in cu29::prelude - Rust

Struct CopperContext

Source
pub struct CopperContext {
+CopperContext in cu29::prelude - Rust

Struct CopperContext

Source
pub struct CopperContext {
     pub unified_logger: Arc<Mutex<UnifiedLoggerWrite>>,
     pub logger_runtime: LoggerRuntime,
     pub clock: RobotClock,
diff --git a/cu29/prelude/struct.CopperLiskMask.html b/cu29/prelude/struct.CopperLiskMask.html
index 230de86d9..5bb628f4a 100644
--- a/cu29/prelude/struct.CopperLiskMask.html
+++ b/cu29/prelude/struct.CopperLiskMask.html
@@ -1,4 +1,4 @@
-CopperLiskMask in cu29::prelude - Rust

Struct CopperLiskMask

Source
pub struct CopperLiskMask { /* private fields */ }
Expand description

Not implemented yet. +CopperLiskMask in cu29::prelude - Rust

Struct CopperLiskMask

Source
pub struct CopperLiskMask { /* private fields */ }
Expand description

Not implemented yet. This mask will be used to for example filter out necessary regions of a copper list between remote systems.

Trait Implementations§

Source§

impl<'__de> BorrowDecode<'__de> for CopperLiskMask

Source§

fn borrow_decode<__D>(decoder: &mut __D) -> Result<CopperLiskMask, DecodeError>
where __D: BorrowDecoder<'__de>,

Attempt to decode this type with the given BorrowDecode.
Source§

impl Clone for CopperLiskMask

Source§

fn clone(&self) -> CopperLiskMask

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CopperLiskMask

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Decode for CopperLiskMask

Source§

fn decode<__D>(decoder: &mut __D) -> Result<CopperLiskMask, DecodeError>
where diff --git a/cu29/prelude/struct.CopperList.html b/cu29/prelude/struct.CopperList.html index 7fa66f2c0..575a859d3 100644 --- a/cu29/prelude/struct.CopperList.html +++ b/cu29/prelude/struct.CopperList.html @@ -1,4 +1,4 @@ -CopperList in cu29::prelude - Rust

Struct CopperList

Source
pub struct CopperList<P>
where +CopperList in cu29::prelude - Rust

Struct CopperList

Source
pub struct CopperList<P>
where P: CopperListTuple,
{ pub id: u32, pub msgs: P, diff --git a/cu29/prelude/struct.CountingAllocator.html b/cu29/prelude/struct.CountingAllocator.html index a7c94f91e..a426139fa 100644 --- a/cu29/prelude/struct.CountingAllocator.html +++ b/cu29/prelude/struct.CountingAllocator.html @@ -1,4 +1,4 @@ -CountingAllocator in cu29::prelude - Rust

Struct CountingAllocator

Source
pub struct CountingAllocator { /* private fields */ }
Expand description

A simple allocator that counts the number of bytes allocated and deallocated.

+CountingAllocator in cu29::prelude - Rust

Struct CountingAllocator

Source
pub struct CountingAllocator { /* private fields */ }
Expand description

A simple allocator that counts the number of bytes allocated and deallocated.

Implementations§

Trait Implementations§

Source§

impl Default for CountingAllocator

Source§

fn default() -> CountingAllocator

Returns the “default value” for a type. Read more
Source§

impl GlobalAlloc for CountingAllocator

Source§

unsafe fn alloc(&self, layout: Layout) -> *mut u8

Allocates memory as described by the given layout. Read more
Source§

unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout)

Deallocates the block of memory at the given ptr pointer with the given layout. Read more
1.28.0 · Source§

unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8

Behaves like alloc, but also ensures that the contents are set to zero before being returned. Read more
1.28.0 · Source§

unsafe fn realloc( &self, diff --git a/cu29/prelude/struct.CuArray.html b/cu29/prelude/struct.CuArray.html index dec5439c3..12dfb3115 100644 --- a/cu29/prelude/struct.CuArray.html +++ b/cu29/prelude/struct.CuArray.html @@ -1,4 +1,4 @@ -CuArray in cu29::prelude - Rust

Struct CuArray

Source
pub struct CuArray<T, const N: usize> { /* private fields */ }
Expand description

Copper friendly wrapper for a fixed size array.

+CuArray in cu29::prelude - Rust

Struct CuArray

Source
pub struct CuArray<T, const N: usize> { /* private fields */ }
Expand description

Copper friendly wrapper for a fixed size array.

Implementations§

Source§

impl<T, const N: usize> CuArray<T, N>

Source

pub fn new() -> CuArray<T, N>

Source

pub fn fill_from_iter<I>(&mut self, iter: I)
where I: IntoIterator<Item = T>,

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn as_slice(&self) -> &[T]

Source

pub fn capacity(&self) -> usize

Trait Implementations§

Source§

impl<T, const N: usize> Clone for CuArray<T, N>
where T: Clone,

Source§

fn clone(&self) -> CuArray<T, N>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, const N: usize> Debug for CuArray<T, N>
where diff --git a/cu29/prelude/struct.CuCompactString.html b/cu29/prelude/struct.CuCompactString.html index ab734ae85..e2cba417c 100644 --- a/cu29/prelude/struct.CuCompactString.html +++ b/cu29/prelude/struct.CuCompactString.html @@ -1,4 +1,4 @@ -CuCompactString in cu29::prelude - Rust

Struct CuCompactString

Source
pub struct CuCompactString(pub CompactString);

Tuple Fields§

§0: CompactString

Trait Implementations§

Source§

impl<'de> BorrowDecode<'de> for CuCompactString

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<CuCompactString, DecodeError>
where +CuCompactString in cu29::prelude - Rust

Struct CuCompactString

Source
pub struct CuCompactString(pub CompactString);

Tuple Fields§

§0: CompactString

Trait Implementations§

Source§

impl<'de> BorrowDecode<'de> for CuCompactString

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<CuCompactString, DecodeError>
where D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
Source§

impl Clone for CuCompactString

Source§

fn clone(&self) -> CuCompactString

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CuCompactString

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Decode for CuCompactString

Source§

fn decode<D>(decoder: &mut D) -> Result<CuCompactString, DecodeError>
where D: Decoder,

Attempt to decode this type with the given Decode.
Source§

impl Default for CuCompactString

Source§

fn default() -> CuCompactString

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CuCompactString

Source§

fn deserialize<__D>( __deserializer: __D, diff --git a/cu29/prelude/struct.CuConfig.html b/cu29/prelude/struct.CuConfig.html index 66fd3c396..e30055c1a 100644 --- a/cu29/prelude/struct.CuConfig.html +++ b/cu29/prelude/struct.CuConfig.html @@ -1,4 +1,4 @@ -CuConfig in cu29::prelude - Rust

Struct CuConfig

Source
pub struct CuConfig {
+CuConfig in cu29::prelude - Rust

Struct CuConfig

Source
pub struct CuConfig {
     pub graph: StableGraph<Node, Cnx>,
     pub monitor: Option<MonitorConfig>,
     pub logging: Option<LoggingConfig>,
diff --git a/cu29/prelude/struct.CuDuration.html b/cu29/prelude/struct.CuDuration.html
index dded80950..b08ab74b2 100644
--- a/cu29/prelude/struct.CuDuration.html
+++ b/cu29/prelude/struct.CuDuration.html
@@ -1,4 +1,4 @@
-CuDuration in cu29::prelude - Rust

Struct CuDuration

pub struct CuDuration(pub u64);
Expand description

For Robot times, the underlying type is a u64 representing nanoseconds. +CuDuration in cu29::prelude - Rust

Struct CuDuration

pub struct CuDuration(pub u64);
Expand description

For Robot times, the underlying type is a u64 representing nanoseconds. It is always positive to simplify the reasoning on the user side.

Tuple Fields§

§0: u64

Implementations§

§

impl CuDuration

pub const MIN: CuDuration

pub const MAX: CuDuration

pub fn max(&self, p0: CuDuration) -> CuDuration

pub fn min(&self, p0: CuDuration) -> CuDuration

pub fn as_nanos(&self) -> u64

Trait Implementations§

§

impl Add for CuDuration

§

type Output = CuDuration

The resulting type after applying the + operator.
§

fn add(self, rhs: CuDuration) -> <CuDuration as Add>::Output

Performs the + operation. Read more
§

impl AddAssign for CuDuration

§

fn add_assign(&mut self, rhs: CuDuration)

Performs the += operation. Read more
§

impl<'de> BorrowDecode<'de> for CuDuration

§

fn borrow_decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>
where D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
§

impl Clone for CuDuration

§

fn clone(&self) -> CuDuration

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CuDuration

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Decode for CuDuration

§

fn decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>
where @@ -9,13 +9,13 @@ T: Into<u64>,

§

type Output = CuDuration

The resulting type after applying the / operator.
§

fn div(self, rhs: T) -> CuDuration

Performs the / operation. Read more
§

impl Encode for CuDuration

§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where E: Encoder,

Encode a given type.
§

impl From<CuDuration> for OptionCuTime

§

fn from(val: CuDuration) -> OptionCuTime

Converts to this type from the input type.
§

impl From<CuDuration> for Tov

§

fn from(duration: CuDuration) -> Tov

Converts to this type from the input type.
§

impl From<Duration> for CuDuration

bridge the API with standard Durations.

§

fn from(duration: Duration) -> CuDuration

Converts to this type from the input type.
§

impl From<u64> for CuDuration

§

fn from(duration: u64) -> CuDuration

Converts to this type from the input type.
§

impl<T> Mul<T> for CuDuration
where - T: Into<u64>,

§

type Output = CuDuration

The resulting type after applying the * operator.
§

fn mul(self, rhs: T) -> CuDuration

Performs the * operation. Read more
§

impl Ord for CuDuration

§

fn cmp(&self, other: &CuDuration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where + T: Into<u64>,

§

type Output = CuDuration

The resulting type after applying the * operator.
§

fn mul(self, rhs: T) -> CuDuration

Performs the * operation. Read more
§

impl Ord for CuDuration

§

fn cmp(&self, other: &CuDuration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for CuDuration

§

fn eq(&self, other: &CuDuration) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
§

impl PartialOrd for CuDuration

§

fn partial_cmp(&self, other: &CuDuration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > -operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +and should not be overridden without very good reason.
§

impl PartialOrd for CuDuration

§

fn partial_cmp(&self, other: &CuDuration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl Serialize for CuDuration

§

fn serialize<__S>( &self, __serializer: __S, diff --git a/cu29/prelude/struct.CuDurationStatistics.html b/cu29/prelude/struct.CuDurationStatistics.html index 101a78844..6de284f26 100644 --- a/cu29/prelude/struct.CuDurationStatistics.html +++ b/cu29/prelude/struct.CuDurationStatistics.html @@ -1,4 +1,4 @@ -CuDurationStatistics in cu29::prelude - Rust

Struct CuDurationStatistics

Source
pub struct CuDurationStatistics { /* private fields */ }
Expand description

A Specialized statistics object for CuDuration. +CuDurationStatistics in cu29::prelude - Rust

Struct CuDurationStatistics

Source
pub struct CuDurationStatistics { /* private fields */ }
Expand description

A Specialized statistics object for CuDuration. It will also keep track of the jitter between the values.

Implementations§

Source§

impl CuDurationStatistics

Source

pub fn new(max: CuDuration) -> CuDurationStatistics

Source

pub fn min(&self) -> CuDuration

Source

pub fn max(&self) -> CuDuration

Source

pub fn mean(&self) -> CuDuration

Source

pub fn percentile(&self, percentile: f64) -> CuDuration

Source

pub fn stddev(&self) -> CuDuration

Source

pub fn len(&self) -> u64

Source

pub fn is_empty(&self) -> bool

Source

pub fn jitter_min(&self) -> CuDuration

Source

pub fn jitter_max(&self) -> CuDuration

Source

pub fn jitter_mean(&self) -> CuDuration

Source

pub fn jitter_stddev(&self) -> CuDuration

Source

pub fn jitter_percentile(&self, percentile: f64) -> CuDuration

Source

pub fn record(&mut self, value: CuDuration)

Source

pub fn reset(&mut self)

Trait Implementations§

Source§

impl Clone for CuDurationStatistics

Source§

fn clone(&self) -> CuDurationStatistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CuDurationStatistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29/prelude/struct.CuError.html b/cu29/prelude/struct.CuError.html index 3142d6415..2f51aa0bb 100644 --- a/cu29/prelude/struct.CuError.html +++ b/cu29/prelude/struct.CuError.html @@ -1,4 +1,4 @@ -CuError in cu29::prelude - Rust

Struct CuError

pub struct CuError { /* private fields */ }
Expand description

Common copper Error type.

+CuError in cu29::prelude - Rust

Struct CuError

pub struct CuError { /* private fields */ }
Expand description

Common copper Error type.

Implementations§

§

impl CuError

pub fn new_with_cause(message: &str, cause: impl Error) -> CuError

pub fn add_cause(self, context: &str) -> CuError

Trait Implementations§

§

impl Clone for CuError

§

fn clone(&self) -> CuError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CuError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for CuError

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<CuError, <__D as Deserializer<'de>>::Error>
where diff --git a/cu29/prelude/struct.CuExecutionLoop.html b/cu29/prelude/struct.CuExecutionLoop.html index d6af895eb..2f7f4944f 100644 --- a/cu29/prelude/struct.CuExecutionLoop.html +++ b/cu29/prelude/struct.CuExecutionLoop.html @@ -1,4 +1,4 @@ -CuExecutionLoop in cu29::prelude - Rust

Struct CuExecutionLoop

Source
pub struct CuExecutionLoop {
+CuExecutionLoop in cu29::prelude - Rust

Struct CuExecutionLoop

Source
pub struct CuExecutionLoop {
     pub steps: Vec<CuExecutionUnit>,
     pub loop_count: Option<u32>,
 }
Expand description

This structure represents a loop in the execution plan. diff --git a/cu29/prelude/struct.CuExecutionStep.html b/cu29/prelude/struct.CuExecutionStep.html index a8f96afcf..e6f73d599 100644 --- a/cu29/prelude/struct.CuExecutionStep.html +++ b/cu29/prelude/struct.CuExecutionStep.html @@ -1,4 +1,4 @@ -CuExecutionStep in cu29::prelude - Rust

Struct CuExecutionStep

Source
pub struct CuExecutionStep {
+CuExecutionStep in cu29::prelude - Rust

Struct CuExecutionStep

Source
pub struct CuExecutionStep {
     pub node_id: u32,
     pub node: Node,
     pub task_type: CuTaskType,
diff --git a/cu29/prelude/struct.CuHandle.html b/cu29/prelude/struct.CuHandle.html
index 293f059af..3f14f0208 100644
--- a/cu29/prelude/struct.CuHandle.html
+++ b/cu29/prelude/struct.CuHandle.html
@@ -1,4 +1,4 @@
-CuHandle in cu29::prelude - Rust

Struct CuHandle

Source
pub struct CuHandle<T>(/* private fields */)
+CuHandle in cu29::prelude - Rust

Struct CuHandle

Source
pub struct CuHandle<T>(/* private fields */)
 where
     T: ArrayLike;
Expand description

A shareable handle to an Array coming from a pool (either host or device).

Implementations§

Source§

impl<T> CuHandle<T>
where diff --git a/cu29/prelude/struct.CuHostMemoryPool.html b/cu29/prelude/struct.CuHostMemoryPool.html index 988d838a7..a864614d8 100644 --- a/cu29/prelude/struct.CuHostMemoryPool.html +++ b/cu29/prelude/struct.CuHostMemoryPool.html @@ -1,4 +1,4 @@ -CuHostMemoryPool in cu29::prelude - Rust

Struct CuHostMemoryPool

Source
pub struct CuHostMemoryPool<T> { /* private fields */ }
Expand description

A pool of host memory buffers.

+CuHostMemoryPool in cu29::prelude - Rust

Struct CuHostMemoryPool

Source
pub struct CuHostMemoryPool<T> { /* private fields */ }
Expand description

A pool of host memory buffers.

Implementations§

Source§

impl<T> CuHostMemoryPool<T>
where T: ArrayLike + 'static,

Source

pub fn new<F>( id: &str, diff --git a/cu29/prelude/struct.CuListsManager.html b/cu29/prelude/struct.CuListsManager.html index 26a776055..7ed47f0b1 100644 --- a/cu29/prelude/struct.CuListsManager.html +++ b/cu29/prelude/struct.CuListsManager.html @@ -1,4 +1,4 @@ -CuListsManager in cu29::prelude - Rust

Struct CuListsManager

Source
pub struct CuListsManager<P, const N: usize>
where +CuListsManager in cu29::prelude - Rust

Struct CuListsManager

Source
pub struct CuListsManager<P, const N: usize>
where P: CopperListTuple,
{ /* private fields */ }
Expand description

This structure maintains the entire memory needed by Copper for one loop for the inter tasks communication within a process. P or Payload is typically a Tuple of various types of messages that are exchanged between tasks. N is the maximum number of in flight Copper List the runtime can support.

diff --git a/cu29/prelude/struct.CuLogEntry.html b/cu29/prelude/struct.CuLogEntry.html index 8b72b24d7..a9fe793b5 100644 --- a/cu29/prelude/struct.CuLogEntry.html +++ b/cu29/prelude/struct.CuLogEntry.html @@ -1,4 +1,4 @@ -CuLogEntry in cu29::prelude - Rust

Struct CuLogEntry

pub struct CuLogEntry {
+CuLogEntry in cu29::prelude - Rust

Struct CuLogEntry

pub struct CuLogEntry {
     pub time: CuDuration,
     pub msg_index: u32,
     pub paramname_indexes: SmallVec<[u32; 10]>,
diff --git a/cu29/prelude/struct.CuMsg.html b/cu29/prelude/struct.CuMsg.html
index 3d4bafffd..8a7095b8c 100644
--- a/cu29/prelude/struct.CuMsg.html
+++ b/cu29/prelude/struct.CuMsg.html
@@ -1,4 +1,4 @@
-CuMsg in cu29::prelude - Rust

Struct CuMsg

Source
pub struct CuMsg<T>
where +CuMsg in cu29::prelude - Rust

Struct CuMsg

Source
pub struct CuMsg<T>
where T: CuMsgPayload,
{ pub metadata: CuMsgMetadata, /* private fields */ diff --git a/cu29/prelude/struct.CuMsgMetadata.html b/cu29/prelude/struct.CuMsgMetadata.html index 5cbedcbce..374b6a8d1 100644 --- a/cu29/prelude/struct.CuMsgMetadata.html +++ b/cu29/prelude/struct.CuMsgMetadata.html @@ -1,4 +1,4 @@ -CuMsgMetadata in cu29::prelude - Rust

Struct CuMsgMetadata

Source
pub struct CuMsgMetadata {
+CuMsgMetadata in cu29::prelude - Rust

Struct CuMsgMetadata

Source
pub struct CuMsgMetadata {
     pub process_time: PartialCuTimeRange,
     pub tov: Tov,
     pub status_txt: CuCompactString,
diff --git a/cu29/prelude/struct.CuRuntime.html b/cu29/prelude/struct.CuRuntime.html
index 66a5d7bb8..5862143cc 100644
--- a/cu29/prelude/struct.CuRuntime.html
+++ b/cu29/prelude/struct.CuRuntime.html
@@ -1,4 +1,4 @@
-CuRuntime in cu29::prelude - Rust

Struct CuRuntime

Source
pub struct CuRuntime<CT, P, M, const NBCL: usize>
where +CuRuntime in cu29::prelude - Rust

Struct CuRuntime

Source
pub struct CuRuntime<CT, P, M, const NBCL: usize>{
     pub tasks: CT,
diff --git a/cu29/prelude/struct.CuSimSinkTask.html b/cu29/prelude/struct.CuSimSinkTask.html
index 67e3eb4c8..de37dca00 100644
--- a/cu29/prelude/struct.CuSimSinkTask.html
+++ b/cu29/prelude/struct.CuSimSinkTask.html
@@ -1,4 +1,4 @@
-CuSimSinkTask in cu29::prelude - Rust

Struct CuSimSinkTask

Source
pub struct CuSimSinkTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a sink task for the simulations. +CuSimSinkTask in cu29::prelude - Rust

Struct CuSimSinkTask

Source
pub struct CuSimSinkTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a sink task for the simulations. It basically does nothing in place of a real driver so it won’t try to initialize any hardware.

Trait Implementations§

Source§

impl<'cl, T> CuSinkTask<'cl> for CuSimSinkTask<T>
where T: CuMsgPayload + 'cl,

Source§

type Input = &'cl CuMsg<T>

Source§

fn new(_config: Option<&ComponentConfig>) -> Result<CuSimSinkTask<T>, CuError>
where diff --git a/cu29/prelude/struct.CuSimSrcTask.html b/cu29/prelude/struct.CuSimSrcTask.html index a6dd282c1..a8a9c36a1 100644 --- a/cu29/prelude/struct.CuSimSrcTask.html +++ b/cu29/prelude/struct.CuSimSrcTask.html @@ -1,4 +1,4 @@ -CuSimSrcTask in cu29::prelude - Rust

Struct CuSimSrcTask

Source
pub struct CuSimSrcTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a source task for the simulations. +CuSimSrcTask in cu29::prelude - Rust

Struct CuSimSrcTask

Source
pub struct CuSimSrcTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a source task for the simulations. It basically does nothing in place of a real driver so it won’t try to initialize any hardware.

Trait Implementations§

Source§

impl<'cl, T> CuSrcTask<'cl> for CuSimSrcTask<T>
where T: CuMsgPayload + 'cl,

Source§

type Output = &'cl mut CuMsg<T>

Source§

fn new(_config: Option<&ComponentConfig>) -> Result<CuSimSrcTask<T>, CuError>
where diff --git a/cu29/prelude/struct.CuTimeRange.html b/cu29/prelude/struct.CuTimeRange.html index 17ec22851..d4f333b4d 100644 --- a/cu29/prelude/struct.CuTimeRange.html +++ b/cu29/prelude/struct.CuTimeRange.html @@ -1,4 +1,4 @@ -CuTimeRange in cu29::prelude - Rust

Struct CuTimeRange

pub struct CuTimeRange {
+CuTimeRange in cu29::prelude - Rust

Struct CuTimeRange

pub struct CuTimeRange {
     pub start: CuDuration,
     pub end: CuDuration,
 }
Expand description

Represents a time range.

diff --git a/cu29/prelude/struct.Instant.html b/cu29/prelude/struct.Instant.html index f15ce47f3..e6cf32ce9 100644 --- a/cu29/prelude/struct.Instant.html +++ b/cu29/prelude/struct.Instant.html @@ -1,4 +1,4 @@ -Instant in cu29::prelude - Rust

Struct Instant

pub struct Instant(/* private fields */);
Expand description

A point-in-time wall-clock measurement.

+Instant in cu29::prelude - Rust

Struct Instant

pub struct Instant(/* private fields */);
Expand description

A point-in-time wall-clock measurement.

Mimics most of the functionality of std::time::Instant but provides an additional method for using the “recent time” feature of quanta.

§Monotonicity

@@ -94,13 +94,13 @@
§Examples

Trait Implementations§

§

impl Add<Duration> for Instant

§

fn add(self, other: Duration) -> Instant

§Panics

This function may panic if the resulting point in time cannot be represented by the underlying data structure. See Instant::checked_add for a version without panic.

-
§

type Output = Instant

The resulting type after applying the + operator.
§

impl AddAssign<Duration> for Instant

§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
§

impl Clone for Instant

§

fn clone(&self) -> Instant

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Instant

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Ord for Instant

§

fn cmp(&self, other: &Instant) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where +

§

type Output = Instant

The resulting type after applying the + operator.
§

impl AddAssign<Duration> for Instant

§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
§

impl Clone for Instant

§

fn clone(&self) -> Instant

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Instant

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Ord for Instant

§

fn cmp(&self, other: &Instant) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Instant

§

fn eq(&self, other: &Instant) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
§

impl PartialOrd for Instant

§

fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > -operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +and should not be overridden without very good reason.
§

impl PartialOrd for Instant

§

fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
§

impl Sub for Instant

§

fn sub(self, other: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

§Panics
diff --git a/cu29/prelude/struct.LiveStatistics.html b/cu29/prelude/struct.LiveStatistics.html index 3842d0df3..35d294b7c 100644 --- a/cu29/prelude/struct.LiveStatistics.html +++ b/cu29/prelude/struct.LiveStatistics.html @@ -1,4 +1,4 @@ -LiveStatistics in cu29::prelude - Rust

Struct LiveStatistics

Source
pub struct LiveStatistics { /* private fields */ }
Expand description

Accumulative stat object that can give your some real time statistics.

+LiveStatistics in cu29::prelude - Rust

Struct LiveStatistics

Source
pub struct LiveStatistics { /* private fields */ }
Expand description

Accumulative stat object that can give your some real time statistics.

Implementations§

Source§

impl LiveStatistics

Source

pub fn new_unbounded() -> LiveStatistics

Source

pub fn new_with_max(max: u64) -> LiveStatistics

Source

pub fn min(&self) -> u64

Source

pub fn max(&self) -> u64

Source

pub fn mean(&self) -> f64

Source

pub fn percentile(&self, percentile: f64) -> u64

Source

pub fn record(&mut self, value: u64)

Adds a value to the statistics.

Source

pub fn len(&self) -> u64

Source

pub fn is_empty(&self) -> bool

Source

pub fn reset(&mut self)

Trait Implementations§

Source§

impl Clone for LiveStatistics

Source§

fn clone(&self) -> LiveStatistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LiveStatistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29/prelude/struct.LoggerRuntime.html b/cu29/prelude/struct.LoggerRuntime.html index 55de877be..c04b3f10c 100644 --- a/cu29/prelude/struct.LoggerRuntime.html +++ b/cu29/prelude/struct.LoggerRuntime.html @@ -1,4 +1,4 @@ -LoggerRuntime in cu29::prelude - Rust

Struct LoggerRuntime

pub struct LoggerRuntime {}
Expand description

The lifetime of this struct is the lifetime of the logger.

+LoggerRuntime in cu29::prelude - Rust

Struct LoggerRuntime

pub struct LoggerRuntime {}
Expand description

The lifetime of this struct is the lifetime of the logger.

Implementations§

§

impl LoggerRuntime

pub fn init( clock: RobotClock, destination: impl WriteStream<CuLogEntry> + 'static, diff --git a/cu29/prelude/struct.LoggingConfig.html b/cu29/prelude/struct.LoggingConfig.html index 54bd5faeb..996b9b57a 100644 --- a/cu29/prelude/struct.LoggingConfig.html +++ b/cu29/prelude/struct.LoggingConfig.html @@ -1,4 +1,4 @@ -LoggingConfig in cu29::prelude - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
+LoggingConfig in cu29::prelude - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
     pub slab_size_mib: Option<u64>,
     pub section_size_mib: Option<u64>,
     pub enable_task_logging: bool,
diff --git a/cu29/prelude/struct.MonitorConfig.html b/cu29/prelude/struct.MonitorConfig.html
index 3750e61b9..dcf50614b 100644
--- a/cu29/prelude/struct.MonitorConfig.html
+++ b/cu29/prelude/struct.MonitorConfig.html
@@ -1,4 +1,4 @@
-MonitorConfig in cu29::prelude - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Clone for MonitorConfig

Source§

fn clone(&self) -> MonitorConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorConfig

Source§

fn default() -> MonitorConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorConfig

Source§

fn deserialize<__D>( +MonitorConfig in cu29::prelude - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Clone for MonitorConfig

Source§

fn clone(&self) -> MonitorConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorConfig

Source§

fn default() -> MonitorConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorConfig

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<MonitorConfig, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for MonitorConfig

Source§

fn serialize<__S>( diff --git a/cu29/prelude/struct.NoMonitor.html b/cu29/prelude/struct.NoMonitor.html index 02ac36d35..973840b87 100644 --- a/cu29/prelude/struct.NoMonitor.html +++ b/cu29/prelude/struct.NoMonitor.html @@ -1,4 +1,4 @@ -NoMonitor in cu29::prelude - Rust

Struct NoMonitor

Source
pub struct NoMonitor {}
Expand description

A do nothing monitor if no monitor is provided. +NoMonitor in cu29::prelude - Rust

Struct NoMonitor

Source
pub struct NoMonitor {}
Expand description

A do nothing monitor if no monitor is provided. This is basically defining the default behavior of Copper in case of error.

Trait Implementations§

Source§

impl CuMonitor for NoMonitor

Source§

fn new( _config: &CuConfig, diff --git a/cu29/prelude/struct.Node.html b/cu29/prelude/struct.Node.html index c11c00c3f..ae91a531d 100644 --- a/cu29/prelude/struct.Node.html +++ b/cu29/prelude/struct.Node.html @@ -1,4 +1,4 @@ -Node in cu29::prelude - Rust

Struct Node

Source
pub struct Node { /* private fields */ }
Expand description

A node in the configuration graph. +Node in cu29::prelude - Rust

Struct Node

Source
pub struct Node { /* private fields */ }
Expand description

A node in the configuration graph. A node represents a Task in the system Graph.

Implementations§

Source§

impl Node

Source

pub fn new(id: &str, ptype: &str) -> Node

Source

pub fn get_id(&self) -> String

Source

pub fn set_type(self, name: Option<String>) -> Node

Source

pub fn get_type(&self) -> &str

Source

pub fn get_instance_config(&self) -> Option<&ComponentConfig>

Source

pub fn get_param<T>(&self, key: &str) -> Option<T>
where T: From<Value>,

Source

pub fn set_param<T>(&mut self, key: &str, value: T)
where diff --git a/cu29/prelude/struct.NullLog.html b/cu29/prelude/struct.NullLog.html index e3881d27b..ec726ba41 100644 --- a/cu29/prelude/struct.NullLog.html +++ b/cu29/prelude/struct.NullLog.html @@ -1,4 +1,4 @@ -NullLog in cu29::prelude - Rust

Struct NullLog

pub struct NullLog;

Trait Implementations§

§

impl Log for NullLog

§

fn enabled(&self, _metadata: &Metadata<'_>) -> bool

Determines if a log message with the specified metadata would be +NullLog in cu29::prelude - Rust

Struct NullLog

pub struct NullLog;

Trait Implementations§

§

impl Log for NullLog

§

fn enabled(&self, _metadata: &Metadata<'_>) -> bool

Determines if a log message with the specified metadata would be logged. Read more
§

fn log(&self, _record: &Record<'_>)

Logs the Record. Read more
§

fn flush(&self)

Flushes any buffered records. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where diff --git a/cu29/prelude/struct.OptionCuTime.html b/cu29/prelude/struct.OptionCuTime.html index 3c94a9fce..f3eb157d3 100644 --- a/cu29/prelude/struct.OptionCuTime.html +++ b/cu29/prelude/struct.OptionCuTime.html @@ -1,4 +1,4 @@ -OptionCuTime in cu29::prelude - Rust

Struct OptionCuTime

pub struct OptionCuTime(/* private fields */);
Expand description

Homebrewed Option<CuDuration> to avoid using 128bits just to represent an Option.

+OptionCuTime in cu29::prelude - Rust

Struct OptionCuTime

pub struct OptionCuTime(/* private fields */);
Expand description

Homebrewed Option<CuDuration> to avoid using 128bits just to represent an Option.

Implementations§

§

impl OptionCuTime

pub fn is_none(&self) -> bool

pub fn none() -> OptionCuTime

pub fn unwrap(self) -> CuDuration

Trait Implementations§

§

impl<'__de> BorrowDecode<'__de> for OptionCuTime

§

fn borrow_decode<__D>(decoder: &mut __D) -> Result<OptionCuTime, DecodeError>
where __D: BorrowDecoder<'__de>,

Attempt to decode this type with the given BorrowDecode.
§

impl Clone for OptionCuTime

§

fn clone(&self) -> OptionCuTime

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for OptionCuTime

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Decode for OptionCuTime

§

fn decode<__D>(decoder: &mut __D) -> Result<OptionCuTime, DecodeError>
where __D: Decoder,

Attempt to decode this type with the given Decode.
§

impl Default for OptionCuTime

§

fn default() -> OptionCuTime

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for OptionCuTime

§

fn deserialize<__D>( diff --git a/cu29/prelude/struct.OwningIoWriter.html b/cu29/prelude/struct.OwningIoWriter.html index 8a71ad885..143ae6c7f 100644 --- a/cu29/prelude/struct.OwningIoWriter.html +++ b/cu29/prelude/struct.OwningIoWriter.html @@ -1,4 +1,4 @@ -OwningIoWriter in cu29::prelude - Rust

Struct OwningIoWriter

pub struct OwningIoWriter<W>
where +OwningIoWriter in cu29::prelude - Rust

Struct OwningIoWriter

pub struct OwningIoWriter<W>
where W: Write,
{ /* private fields */ }

Implementations§

§

impl<W> OwningIoWriter<W>
where W: Write,

pub fn new(writer: W) -> OwningIoWriter<W>

pub fn bytes_written(&self) -> usize

pub fn flush(&mut self) -> Result<(), EncodeError>

Trait Implementations§

§

impl<W> Writer for OwningIoWriter<W>
where W: Write,

§

fn write(&mut self, bytes: &[u8]) -> Result<(), EncodeError>

Write bytes to the underlying writer. Exactly bytes.len() bytes must be written, or else an error should be returned.

Auto Trait Implementations§

§

impl<W> Freeze for OwningIoWriter<W>
where diff --git a/cu29/prelude/struct.PartialCuTimeRange.html b/cu29/prelude/struct.PartialCuTimeRange.html index a8671f988..12532278d 100644 --- a/cu29/prelude/struct.PartialCuTimeRange.html +++ b/cu29/prelude/struct.PartialCuTimeRange.html @@ -1,4 +1,4 @@ -PartialCuTimeRange in cu29::prelude - Rust

Struct PartialCuTimeRange

pub struct PartialCuTimeRange {
+PartialCuTimeRange in cu29::prelude - Rust

Struct PartialCuTimeRange

pub struct PartialCuTimeRange {
     pub start: OptionCuTime,
     pub end: OptionCuTime,
 }
Expand description

Represents a time range with possible undefined start or end or both.

diff --git a/cu29/prelude/struct.RobotClock.html b/cu29/prelude/struct.RobotClock.html index 53507e95a..1772f37a0 100644 --- a/cu29/prelude/struct.RobotClock.html +++ b/cu29/prelude/struct.RobotClock.html @@ -1,4 +1,4 @@ -RobotClock in cu29::prelude - Rust

Struct RobotClock

pub struct RobotClock { /* private fields */ }
Expand description

A running Robot clock. +RobotClock in cu29::prelude - Rust

Struct RobotClock

pub struct RobotClock { /* private fields */ }
Expand description

A running Robot clock. The clock is a monotonic clock that starts at an arbitrary reference time. It is clone resilient, ie a clone will be the same clock, even when mocked.

Implementations§

§

impl RobotClock

pub fn new() -> RobotClock

Creates a RobotClock using now as its reference time. diff --git a/cu29/prelude/struct.RobotClockMock.html b/cu29/prelude/struct.RobotClockMock.html index 2702fccee..6653bfced 100644 --- a/cu29/prelude/struct.RobotClockMock.html +++ b/cu29/prelude/struct.RobotClockMock.html @@ -1,4 +1,4 @@ -RobotClockMock in cu29::prelude - Rust

Struct RobotClockMock

pub struct RobotClockMock(/* private fields */);
Expand description

A mock clock that can be controlled by the user.

+RobotClockMock in cu29::prelude - Rust

Struct RobotClockMock

pub struct RobotClockMock(/* private fields */);
Expand description

A mock clock that can be controlled by the user.

Implementations§

§

impl RobotClockMock

pub fn increment(&self, amount: Duration)

pub fn decrement(&self, amount: Duration)

Decrements the time by the given amount. Be careful this brakes the monotonicity of the clock.

pub fn value(&self) -> u64

Gets the current value of time.

diff --git a/cu29/prelude/struct.ScopedAllocCounter.html b/cu29/prelude/struct.ScopedAllocCounter.html index 6eb0cee67..f72b1a9be 100644 --- a/cu29/prelude/struct.ScopedAllocCounter.html +++ b/cu29/prelude/struct.ScopedAllocCounter.html @@ -1,4 +1,4 @@ -ScopedAllocCounter in cu29::prelude - Rust

Struct ScopedAllocCounter

Source
pub struct ScopedAllocCounter { /* private fields */ }
Expand description

A simple struct that counts the number of bytes allocated and deallocated in a scope.

+ScopedAllocCounter in cu29::prelude - Rust

Struct ScopedAllocCounter

Source
pub struct ScopedAllocCounter { /* private fields */ }
Expand description

A simple struct that counts the number of bytes allocated and deallocated in a scope.

Implementations§

Source§

impl ScopedAllocCounter

Source

pub fn new() -> ScopedAllocCounter

Source

pub fn get_allocated(&self) -> usize

Returns the total number of bytes allocated in the current scope since the creation of this ScopedAllocCounter.

§Example
diff --git a/cu29/prelude/struct.SectionHandle.html b/cu29/prelude/struct.SectionHandle.html index 77b7b3577..59632dafa 100644 --- a/cu29/prelude/struct.SectionHandle.html +++ b/cu29/prelude/struct.SectionHandle.html @@ -1,4 +1,4 @@ -SectionHandle in cu29::prelude - Rust

Struct SectionHandle

pub struct SectionHandle { /* private fields */ }
Expand description

A SectionHandle is a handle to a section in the datalogger. +SectionHandle in cu29::prelude - Rust

Struct SectionHandle

pub struct SectionHandle { /* private fields */ }
Expand description

A SectionHandle is a handle to a section in the datalogger. It allows to track the lifecycle of a section of the datalogger.

Implementations§

§

impl SectionHandle

pub fn create( section_header: SectionHeader, diff --git a/cu29/prelude/struct.SectionHeader.html b/cu29/prelude/struct.SectionHeader.html index 75f777cea..d57f667a4 100644 --- a/cu29/prelude/struct.SectionHeader.html +++ b/cu29/prelude/struct.SectionHeader.html @@ -1,4 +1,4 @@ -SectionHeader in cu29::prelude - Rust

Struct SectionHeader

pub struct SectionHeader { /* private fields */ }
Expand description

Each concurrent sublogger is tracked through a section header. +SectionHeader in cu29::prelude - Rust

Struct SectionHeader

pub struct SectionHeader { /* private fields */ }
Expand description

Each concurrent sublogger is tracked through a section header. They form a linked list of sections. The entry type is used to identify the type of data in the section.

Trait Implementations§

§

impl<'__de> BorrowDecode<'__de> for SectionHeader

§

fn borrow_decode<__D>(decoder: &mut __D) -> Result<SectionHeader, DecodeError>
where diff --git a/cu29/prelude/struct.SimpleFileWriter.html b/cu29/prelude/struct.SimpleFileWriter.html index 8b4d841a8..05b6f478c 100644 --- a/cu29/prelude/struct.SimpleFileWriter.html +++ b/cu29/prelude/struct.SimpleFileWriter.html @@ -1,4 +1,4 @@ -SimpleFileWriter in cu29::prelude - Rust

Struct SimpleFileWriter

pub struct SimpleFileWriter { /* private fields */ }
Expand description

This allows this crate to be used outside of Copper (ie. decoupling it from the unifiedlog.

+SimpleFileWriter in cu29::prelude - Rust

Struct SimpleFileWriter

pub struct SimpleFileWriter { /* private fields */ }
Expand description

This allows this crate to be used outside of Copper (ie. decoupling it from the unifiedlog.

Implementations§

Trait Implementations§

§

impl Debug for SimpleFileWriter

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl WriteStream<CuLogEntry> for SimpleFileWriter

§

fn log(&mut self, obj: &CuLogEntry) -> Result<(), CuError>

§

fn flush(&mut self) -> Result<(), CuError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where diff --git a/cu29/prelude/struct.UnifiedLoggerBuilder.html b/cu29/prelude/struct.UnifiedLoggerBuilder.html index 70e8240f5..219b1b792 100644 --- a/cu29/prelude/struct.UnifiedLoggerBuilder.html +++ b/cu29/prelude/struct.UnifiedLoggerBuilder.html @@ -1,4 +1,4 @@ -UnifiedLoggerBuilder in cu29::prelude - Rust

Struct UnifiedLoggerBuilder

pub struct UnifiedLoggerBuilder { /* private fields */ }
Expand description

Use this builder to create a new DataLogger.

+UnifiedLoggerBuilder in cu29::prelude - Rust

Struct UnifiedLoggerBuilder

pub struct UnifiedLoggerBuilder { /* private fields */ }
Expand description

Use this builder to create a new DataLogger.

Implementations§

§

impl UnifiedLoggerBuilder

pub fn new() -> UnifiedLoggerBuilder

pub fn file_base_name(self, file_path: &Path) -> UnifiedLoggerBuilder

If “something/toto.copper” is given, it will find or create “something/toto_0.copper”, “something/toto_1.copper” etc.

pub fn preallocated_size(self, preallocated_size: usize) -> UnifiedLoggerBuilder

pub fn write(self, write: bool) -> UnifiedLoggerBuilder

pub fn create(self, create: bool) -> UnifiedLoggerBuilder

pub fn build(self) -> Result<UnifiedLogger, Error>

Trait Implementations§

§

impl Default for UnifiedLoggerBuilder

§

fn default() -> UnifiedLoggerBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29/prelude/struct.UnifiedLoggerIOReader.html b/cu29/prelude/struct.UnifiedLoggerIOReader.html index 8f3516125..dd5ddc7a2 100644 --- a/cu29/prelude/struct.UnifiedLoggerIOReader.html +++ b/cu29/prelude/struct.UnifiedLoggerIOReader.html @@ -1,4 +1,4 @@ -UnifiedLoggerIOReader in cu29::prelude - Rust

Struct UnifiedLoggerIOReader

pub struct UnifiedLoggerIOReader { /* private fields */ }
Expand description

This a convenience wrapper around the UnifiedLoggerRead to implement the Read trait.

+UnifiedLoggerIOReader in cu29::prelude - Rust

Struct UnifiedLoggerIOReader

pub struct UnifiedLoggerIOReader { /* private fields */ }
Expand description

This a convenience wrapper around the UnifiedLoggerRead to implement the Read trait.

Implementations§

§

impl UnifiedLoggerIOReader

pub fn new( logger: UnifiedLoggerRead, log_type: UnifiedLogType, diff --git a/cu29/prelude/struct.UnifiedLoggerRead.html b/cu29/prelude/struct.UnifiedLoggerRead.html index cd934c638..75afb9afc 100644 --- a/cu29/prelude/struct.UnifiedLoggerRead.html +++ b/cu29/prelude/struct.UnifiedLoggerRead.html @@ -1,4 +1,4 @@ -UnifiedLoggerRead in cu29::prelude - Rust

Struct UnifiedLoggerRead

pub struct UnifiedLoggerRead { /* private fields */ }
Expand description

A read side of the datalogger.

+UnifiedLoggerRead in cu29::prelude - Rust

Struct UnifiedLoggerRead

pub struct UnifiedLoggerRead { /* private fields */ }
Expand description

A read side of the datalogger.

Implementations§

§

impl UnifiedLoggerRead

pub fn new(base_file_path: &Path) -> Result<UnifiedLoggerRead, Error>

pub fn read_next_section_type( &mut self, datalogtype: UnifiedLogType, diff --git a/cu29/prelude/struct.UnifiedLoggerWrite.html b/cu29/prelude/struct.UnifiedLoggerWrite.html index 49b90d77b..b152b9dd4 100644 --- a/cu29/prelude/struct.UnifiedLoggerWrite.html +++ b/cu29/prelude/struct.UnifiedLoggerWrite.html @@ -1,4 +1,4 @@ -UnifiedLoggerWrite in cu29::prelude - Rust

Struct UnifiedLoggerWrite

pub struct UnifiedLoggerWrite { /* private fields */ }
Expand description

A write side of the datalogger.

+UnifiedLoggerWrite in cu29::prelude - Rust

Struct UnifiedLoggerWrite

pub struct UnifiedLoggerWrite { /* private fields */ }
Expand description

A write side of the datalogger.

Implementations§

§

impl UnifiedLoggerWrite

pub fn flush_section(&mut self, section: &mut SectionHandle)

pub fn stats(&self) -> (usize, Vec<usize>, usize)

Trait Implementations§

§

impl Drop for UnifiedLoggerWrite

§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where diff --git a/cu29/prelude/trait.ArrayLike.html b/cu29/prelude/trait.ArrayLike.html index 8792e68a0..2e53b9cda 100644 --- a/cu29/prelude/trait.ArrayLike.html +++ b/cu29/prelude/trait.ArrayLike.html @@ -1,4 +1,4 @@ -ArrayLike in cu29::prelude - Rust

Trait ArrayLike

Source
pub trait ArrayLike:
+ArrayLike in cu29::prelude - Rust

Trait ArrayLike

Source
pub trait ArrayLike:
     Deref<Target = [Self::Element]>
     + DerefMut
     + Debug
diff --git a/cu29/prelude/trait.ClockProvider.html b/cu29/prelude/trait.ClockProvider.html
index b9292db79..51a66ab11 100644
--- a/cu29/prelude/trait.ClockProvider.html
+++ b/cu29/prelude/trait.ClockProvider.html
@@ -1,4 +1,4 @@
-ClockProvider in cu29::prelude - Rust

Trait ClockProvider

pub trait ClockProvider {
+ClockProvider in cu29::prelude - Rust

Trait ClockProvider

pub trait ClockProvider {
     // Required method
     fn get_clock(&self) -> RobotClock;
 }
Expand description

A trait to provide a clock to the runtime.

diff --git a/cu29/prelude/trait.CopperListTuple.html b/cu29/prelude/trait.CopperListTuple.html index 1255e535f..d3f4c3a82 100644 --- a/cu29/prelude/trait.CopperListTuple.html +++ b/cu29/prelude/trait.CopperListTuple.html @@ -1,4 +1,4 @@ -CopperListTuple in cu29::prelude - Rust

Trait CopperListTuple

pub trait CopperListTuple:
+CopperListTuple in cu29::prelude - Rust

Trait CopperListTuple

pub trait CopperListTuple:
     Sized
     + Encode
     + Decode
diff --git a/cu29/prelude/trait.CuMonitor.html b/cu29/prelude/trait.CuMonitor.html
index 983de1498..8a08d7398 100644
--- a/cu29/prelude/trait.CuMonitor.html
+++ b/cu29/prelude/trait.CuMonitor.html
@@ -1,4 +1,4 @@
-CuMonitor in cu29::prelude - Rust

Trait CuMonitor

Source
pub trait CuMonitor: Sized {
+CuMonitor in cu29::prelude - Rust

Trait CuMonitor

Source
pub trait CuMonitor: Sized {
     // Required methods
     fn new(
         config: &CuConfig,
diff --git a/cu29/prelude/trait.CuMsgPack.html b/cu29/prelude/trait.CuMsgPack.html
index 68c81eb2f..450a8dc29 100644
--- a/cu29/prelude/trait.CuMsgPack.html
+++ b/cu29/prelude/trait.CuMsgPack.html
@@ -1,4 +1,4 @@
-CuMsgPack in cu29::prelude - Rust

Trait CuMsgPack

Source
pub trait CuMsgPack<'cl> { }

Implementations on Foreign Types§

Source§

impl CuMsgPack<'_> for ()

Source§

impl<'cl, T1, T2> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>)
where +CuMsgPack in cu29::prelude - Rust

Trait CuMsgPack

Source
pub trait CuMsgPack<'cl> { }

Implementations on Foreign Types§

Source§

impl CuMsgPack<'_> for ()

Source§

impl<'cl, T1, T2> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>)
where T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl,

Source§

impl<'cl, T1, T2, T3> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>, &'cl CuMsg<T3>)
where T1: CuMsgPayload + 'cl, diff --git a/cu29/prelude/trait.CuMsgPayload.html b/cu29/prelude/trait.CuMsgPayload.html index e00f4f2e0..8a6bc5238 100644 --- a/cu29/prelude/trait.CuMsgPayload.html +++ b/cu29/prelude/trait.CuMsgPayload.html @@ -1,4 +1,4 @@ -CuMsgPayload in cu29::prelude - Rust

Trait CuMsgPayload

Source
pub trait CuMsgPayload:
+CuMsgPayload in cu29::prelude - Rust

Trait CuMsgPayload

Source
pub trait CuMsgPayload:
     Sized
     + Default
     + Debug
diff --git a/cu29/prelude/trait.CuPool.html b/cu29/prelude/trait.CuPool.html
index a8d5913b6..22dea54b2 100644
--- a/cu29/prelude/trait.CuPool.html
+++ b/cu29/prelude/trait.CuPool.html
@@ -1,4 +1,4 @@
-CuPool in cu29::prelude - Rust

Trait CuPool

Source
pub trait CuPool<T>: PoolMonitor
where +CuPool in cu29::prelude - Rust

Trait CuPool

Source
pub trait CuPool<T>: PoolMonitor
where T: ArrayLike,
{ // Required methods fn acquire(&self) -> Option<CuHandle<T>>; diff --git a/cu29/prelude/trait.CuSinkTask.html b/cu29/prelude/trait.CuSinkTask.html index bdaad9fba..8a8f16d5e 100644 --- a/cu29/prelude/trait.CuSinkTask.html +++ b/cu29/prelude/trait.CuSinkTask.html @@ -1,4 +1,4 @@ -CuSinkTask in cu29::prelude - Rust

Trait CuSinkTask

Source
pub trait CuSinkTask<'cl>: Freezable {
+CuSinkTask in cu29::prelude - Rust

Trait CuSinkTask

Source
pub trait CuSinkTask<'cl>: Freezable {
     type Input: CuMsgPack<'cl>;
 
     // Required methods
diff --git a/cu29/prelude/trait.CuSrcTask.html b/cu29/prelude/trait.CuSrcTask.html
index 8950a22ac..f373d8562 100644
--- a/cu29/prelude/trait.CuSrcTask.html
+++ b/cu29/prelude/trait.CuSrcTask.html
@@ -1,4 +1,4 @@
-CuSrcTask in cu29::prelude - Rust

Trait CuSrcTask

Source
pub trait CuSrcTask<'cl>: Freezable {
+CuSrcTask in cu29::prelude - Rust

Trait CuSrcTask

Source
pub trait CuSrcTask<'cl>: Freezable {
     type Output: CuMsgPack<'cl>;
 
     // Required methods
diff --git a/cu29/prelude/trait.CuTask.html b/cu29/prelude/trait.CuTask.html
index 62320a7c8..eff465b76 100644
--- a/cu29/prelude/trait.CuTask.html
+++ b/cu29/prelude/trait.CuTask.html
@@ -1,4 +1,4 @@
-CuTask in cu29::prelude - Rust

Trait CuTask

Source
pub trait CuTask<'cl>: Freezable {
+CuTask in cu29::prelude - Rust

Trait CuTask

Source
pub trait CuTask<'cl>: Freezable {
     type Input: CuMsgPack<'cl>;
     type Output: CuMsgPack<'cl>;
 
diff --git a/cu29/prelude/trait.DeviceCuPool.html b/cu29/prelude/trait.DeviceCuPool.html
index 225e00a05..46f4c1f7d 100644
--- a/cu29/prelude/trait.DeviceCuPool.html
+++ b/cu29/prelude/trait.DeviceCuPool.html
@@ -1,4 +1,4 @@
-DeviceCuPool in cu29::prelude - Rust

Trait DeviceCuPool

Source
pub trait DeviceCuPool<T>: CuPool<T>
where +DeviceCuPool in cu29::prelude - Rust

Trait DeviceCuPool

Source
pub trait DeviceCuPool<T>: CuPool<T>
where T: ArrayLike,
{ // Required method fn copy_to_host_pool<O>( diff --git a/cu29/prelude/trait.ElementType.html b/cu29/prelude/trait.ElementType.html index fe03a23d0..c5a7bc003 100644 --- a/cu29/prelude/trait.ElementType.html +++ b/cu29/prelude/trait.ElementType.html @@ -1,4 +1,4 @@ -ElementType in cu29::prelude - Rust

Trait ElementType

Source
pub trait ElementType:
+ElementType in cu29::prelude - Rust

Trait ElementType

Source
pub trait ElementType:
     Sized
     + Default
     + Copy
diff --git a/cu29/prelude/trait.Freezable.html b/cu29/prelude/trait.Freezable.html
index 04979eb01..9d382e196 100644
--- a/cu29/prelude/trait.Freezable.html
+++ b/cu29/prelude/trait.Freezable.html
@@ -1,4 +1,4 @@
-Freezable in cu29::prelude - Rust

Trait Freezable

Source
pub trait Freezable {
+Freezable in cu29::prelude - Rust

Trait Freezable

Source
pub trait Freezable {
     // Provided methods
     fn freeze<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
        where E: Encoder { ... }
diff --git a/cu29/prelude/trait.PoolMonitor.html b/cu29/prelude/trait.PoolMonitor.html
index bdc5b32aa..2bd47f50d 100644
--- a/cu29/prelude/trait.PoolMonitor.html
+++ b/cu29/prelude/trait.PoolMonitor.html
@@ -1,4 +1,4 @@
-PoolMonitor in cu29::prelude - Rust

Trait PoolMonitor

Source
pub trait PoolMonitor: Send + Sync {
+PoolMonitor in cu29::prelude - Rust

Trait PoolMonitor

Source
pub trait PoolMonitor: Send + Sync {
     // Required methods
     fn id(&self) -> ArrayString<64>;
     fn space_left(&self) -> usize;
diff --git a/cu29/prelude/trait.WriteStream.html b/cu29/prelude/trait.WriteStream.html
index 331c210d6..d6354edc2 100644
--- a/cu29/prelude/trait.WriteStream.html
+++ b/cu29/prelude/trait.WriteStream.html
@@ -1,4 +1,4 @@
-WriteStream in cu29::prelude - Rust

Trait WriteStream

pub trait WriteStream<E>:
+WriteStream in cu29::prelude - Rust

Trait WriteStream

pub trait WriteStream<E>:
     Sync
     + Send
     + Debug
where diff --git a/cu29/prelude/type.AscIter.html b/cu29/prelude/type.AscIter.html index 2fb5be2b2..5f06fddb2 100644 --- a/cu29/prelude/type.AscIter.html +++ b/cu29/prelude/type.AscIter.html @@ -1 +1 @@ -AscIter in cu29::prelude - Rust

Type Alias AscIter

Source
pub type AscIter<'a, T> = Chain<Iter<'a, T>, Iter<'a, T>>;

Aliased Type§

struct AscIter<'a, T> { /* private fields */ }
\ No newline at end of file +AscIter in cu29::prelude - Rust

Type Alias AscIter

Source
pub type AscIter<'a, T> = Chain<Iter<'a, T>, Iter<'a, T>>;

Aliased Type§

struct AscIter<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/prelude/type.AscIterMut.html b/cu29/prelude/type.AscIterMut.html index 095ae8fea..52e1eaef2 100644 --- a/cu29/prelude/type.AscIterMut.html +++ b/cu29/prelude/type.AscIterMut.html @@ -1 +1 @@ -AscIterMut in cu29::prelude - Rust

Type Alias AscIterMut

Source
pub type AscIterMut<'a, T> = Chain<IterMut<'a, T>, IterMut<'a, T>>;

Aliased Type§

struct AscIterMut<'a, T> { /* private fields */ }
\ No newline at end of file +AscIterMut in cu29::prelude - Rust

Type Alias AscIterMut

Source
pub type AscIterMut<'a, T> = Chain<IterMut<'a, T>, IterMut<'a, T>>;

Aliased Type§

struct AscIterMut<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/prelude/type.CuResult.html b/cu29/prelude/type.CuResult.html index be6564b1e..c83495d9e 100644 --- a/cu29/prelude/type.CuResult.html +++ b/cu29/prelude/type.CuResult.html @@ -1,4 +1,4 @@ -CuResult in cu29::prelude - Rust

Type Alias CuResult

pub type CuResult<T> = Result<T, CuError>;

Aliased Type§

enum CuResult<T> {
+CuResult in cu29::prelude - Rust

Type Alias CuResult

pub type CuResult<T> = Result<T, CuError>;

Aliased Type§

enum CuResult<T> {
     Ok(T),
     Err(CuError),
 }

Variants§

§1.0.0

Ok(T)

Contains the success value

diff --git a/cu29/prelude/type.CuTime.html b/cu29/prelude/type.CuTime.html index c7b2b0603..5c440cec9 100644 --- a/cu29/prelude/type.CuTime.html +++ b/cu29/prelude/type.CuTime.html @@ -1,2 +1,2 @@ -CuTime in cu29::prelude - Rust

Type Alias CuTime

pub type CuTime = CuDuration;
Expand description

A robot time is just a duration from a fixed point in time.

+CuTime in cu29::prelude - Rust

Type Alias CuTime

pub type CuTime = CuDuration;
Expand description

A robot time is just a duration from a fixed point in time.

Aliased Type§

struct CuTime(pub u64);

Fields§

§0: u64
\ No newline at end of file diff --git a/cu29/prelude/type.Iter.html b/cu29/prelude/type.Iter.html index 9935d54dd..9a0b8fcd5 100644 --- a/cu29/prelude/type.Iter.html +++ b/cu29/prelude/type.Iter.html @@ -1 +1 @@ -Iter in cu29::prelude - Rust

Type Alias Iter

Source
pub type Iter<'a, T> = Chain<Rev<Iter<'a, T>>, Rev<Iter<'a, T>>>;

Aliased Type§

struct Iter<'a, T> { /* private fields */ }
\ No newline at end of file +Iter in cu29::prelude - Rust

Type Alias Iter

Source
pub type Iter<'a, T> = Chain<Rev<Iter<'a, T>>, Rev<Iter<'a, T>>>;

Aliased Type§

struct Iter<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/prelude/type.IterMut.html b/cu29/prelude/type.IterMut.html index c82189fcf..5b22a27e2 100644 --- a/cu29/prelude/type.IterMut.html +++ b/cu29/prelude/type.IterMut.html @@ -1 +1 @@ -IterMut in cu29::prelude - Rust

Type Alias IterMut

Source
pub type IterMut<'a, T> = Chain<Rev<IterMut<'a, T>>, Rev<IterMut<'a, T>>>;

Aliased Type§

struct IterMut<'a, T> { /* private fields */ }
\ No newline at end of file +IterMut in cu29::prelude - Rust

Type Alias IterMut

Source
pub type IterMut<'a, T> = Chain<Rev<IterMut<'a, T>>, Rev<IterMut<'a, T>>>;

Aliased Type§

struct IterMut<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29/prelude/type.NodeId.html b/cu29/prelude/type.NodeId.html index e69b30727..119fc946e 100644 --- a/cu29/prelude/type.NodeId.html +++ b/cu29/prelude/type.NodeId.html @@ -1,3 +1,3 @@ -NodeId in cu29::prelude - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph +NodeId in cu29::prelude - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph and the code generation.

\ No newline at end of file diff --git a/cu29/simulation/enum.CuTaskCallbackState.html b/cu29/simulation/enum.CuTaskCallbackState.html index 73fbafeb6..49e8f836c 100644 --- a/cu29/simulation/enum.CuTaskCallbackState.html +++ b/cu29/simulation/enum.CuTaskCallbackState.html @@ -1,4 +1,4 @@ -CuTaskCallbackState in cu29::simulation - Rust

Enum CuTaskCallbackState

Source
pub enum CuTaskCallbackState<'cl, I, O>
where +CuTaskCallbackState in cu29::simulation - Rust

Enum CuTaskCallbackState

Source
pub enum CuTaskCallbackState<'cl, I, O>
where I: CuMsgPack<'cl>, O: CuMsgPack<'cl>,
{ New(Option<ComponentConfig>), diff --git a/cu29/simulation/enum.SimOverride.html b/cu29/simulation/enum.SimOverride.html index 6e0bea9f7..bb09ea365 100644 --- a/cu29/simulation/enum.SimOverride.html +++ b/cu29/simulation/enum.SimOverride.html @@ -1,4 +1,4 @@ -SimOverride in cu29::simulation - Rust

Enum SimOverride

Source
pub enum SimOverride {
+SimOverride in cu29::simulation - Rust

Enum SimOverride

Source
pub enum SimOverride {
     ExecutedBySim,
     ExecuteByRuntime,
     Errored(String),
diff --git a/cu29/simulation/index.html b/cu29/simulation/index.html
index d3f0cf1eb..2cd7912b2 100644
--- a/cu29/simulation/index.html
+++ b/cu29/simulation/index.html
@@ -1,4 +1,4 @@
-cu29::simulation - Rust

Module simulation

Source
Expand description

§cu29::simulation Module

+cu29::simulation - Rust

Module simulation

Source
Expand description

§cu29::simulation Module

The cu29::simulation module provides an interface to simulate tasks in Copper-based systems. It offers structures, traits, and enums that enable hooking into the lifecycle of tasks, adapting their behavior, and integrating them with simulated hardware environments.

diff --git a/cu29/simulation/struct.CuSimSinkTask.html b/cu29/simulation/struct.CuSimSinkTask.html index 15f6d5eea..998ee7990 100644 --- a/cu29/simulation/struct.CuSimSinkTask.html +++ b/cu29/simulation/struct.CuSimSinkTask.html @@ -1,4 +1,4 @@ -CuSimSinkTask in cu29::simulation - Rust

Struct CuSimSinkTask

Source
pub struct CuSimSinkTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a sink task for the simulations. +CuSimSinkTask in cu29::simulation - Rust

Struct CuSimSinkTask

Source
pub struct CuSimSinkTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a sink task for the simulations. It basically does nothing in place of a real driver so it won’t try to initialize any hardware.

Trait Implementations§

Source§

impl<'cl, T> CuSinkTask<'cl> for CuSimSinkTask<T>
where T: CuMsgPayload + 'cl,

Source§

type Input = &'cl CuMsg<T>

Source§

fn new(_config: Option<&ComponentConfig>) -> Result<CuSimSinkTask<T>, CuError>
where diff --git a/cu29/simulation/struct.CuSimSrcTask.html b/cu29/simulation/struct.CuSimSrcTask.html index f4c8a54b7..b3e66927a 100644 --- a/cu29/simulation/struct.CuSimSrcTask.html +++ b/cu29/simulation/struct.CuSimSrcTask.html @@ -1,4 +1,4 @@ -CuSimSrcTask in cu29::simulation - Rust

Struct CuSimSrcTask

Source
pub struct CuSimSrcTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a source task for the simulations. +CuSimSrcTask in cu29::simulation - Rust

Struct CuSimSrcTask

Source
pub struct CuSimSrcTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a source task for the simulations. It basically does nothing in place of a real driver so it won’t try to initialize any hardware.

Trait Implementations§

Source§

impl<'cl, T> CuSrcTask<'cl> for CuSimSrcTask<T>
where T: CuMsgPayload + 'cl,

Source§

type Output = &'cl mut CuMsg<T>

Source§

fn new(_config: Option<&ComponentConfig>) -> Result<CuSimSrcTask<T>, CuError>
where diff --git a/cu29/struct.CuError.html b/cu29/struct.CuError.html index f6e21a845..97dae2704 100644 --- a/cu29/struct.CuError.html +++ b/cu29/struct.CuError.html @@ -1,4 +1,4 @@ -CuError in cu29 - Rust

Struct CuError

pub struct CuError { /* private fields */ }
Expand description

Common copper Error type.

+CuError in cu29 - Rust

Struct CuError

pub struct CuError { /* private fields */ }
Expand description

Common copper Error type.

Implementations§

§

impl CuError

pub fn new_with_cause(message: &str, cause: impl Error) -> CuError

pub fn add_cause(self, context: &str) -> CuError

Trait Implementations§

§

impl Clone for CuError

§

fn clone(&self) -> CuError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CuError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for CuError

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<CuError, <__D as Deserializer<'de>>::Error>
where diff --git a/cu29/trait.CopperListTuple.html b/cu29/trait.CopperListTuple.html index e86400959..b735324c1 100644 --- a/cu29/trait.CopperListTuple.html +++ b/cu29/trait.CopperListTuple.html @@ -1,4 +1,4 @@ -CopperListTuple in cu29 - Rust

Trait CopperListTuple

pub trait CopperListTuple:
+CopperListTuple in cu29 - Rust

Trait CopperListTuple

pub trait CopperListTuple:
     Sized
     + Encode
     + Decode
diff --git a/cu29/trait.WriteStream.html b/cu29/trait.WriteStream.html
index 13d0b297b..ed6d17c46 100644
--- a/cu29/trait.WriteStream.html
+++ b/cu29/trait.WriteStream.html
@@ -1,4 +1,4 @@
-WriteStream in cu29 - Rust

Trait WriteStream

pub trait WriteStream<E>:
+WriteStream in cu29 - Rust

Trait WriteStream

pub trait WriteStream<E>:
     Sync
     + Send
     + Debug
where diff --git a/cu29/type.CuResult.html b/cu29/type.CuResult.html index 827c5930b..f1cbe4570 100644 --- a/cu29/type.CuResult.html +++ b/cu29/type.CuResult.html @@ -1,4 +1,4 @@ -CuResult in cu29 - Rust

Type Alias CuResult

pub type CuResult<T> = Result<T, CuError>;

Aliased Type§

enum CuResult<T> {
+CuResult in cu29 - Rust

Type Alias CuResult

pub type CuResult<T> = Result<T, CuError>;

Aliased Type§

enum CuResult<T> {
     Ok(T),
     Err(CuError),
 }

Variants§

§1.0.0

Ok(T)

Contains the success value

diff --git a/cu29_clock/all.html b/cu29_clock/all.html index f536d9e67..f3c6a2673 100644 --- a/cu29_clock/all.html +++ b/cu29_clock/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/cu29_clock/enum.Tov.html b/cu29_clock/enum.Tov.html index 469b71a4a..084a15ccf 100644 --- a/cu29_clock/enum.Tov.html +++ b/cu29_clock/enum.Tov.html @@ -1,4 +1,4 @@ -Tov in cu29_clock - Rust

Enum Tov

Source
pub enum Tov {
+Tov in cu29_clock - Rust

Enum Tov

Source
pub enum Tov {
     None,
     Time(CuTime),
     Range(CuTimeRange),
diff --git a/cu29_clock/index.html b/cu29_clock/index.html
index 5d65b3bb2..761c3092e 100644
--- a/cu29_clock/index.html
+++ b/cu29_clock/index.html
@@ -1,4 +1,4 @@
-cu29_clock - Rust

Crate cu29_clock

Source

Structs§

CuDuration
For Robot times, the underlying type is a u64 representing nanoseconds. +cu29_clock - Rust

Crate cu29_clock

Source

Structs§

CuDuration
For Robot times, the underlying type is a u64 representing nanoseconds. It is always positive to simplify the reasoning on the user side.
CuTimeRange
Represents a time range.
Instant
A point-in-time wall-clock measurement.
OptionCuTime
Homebrewed Option<CuDuration> to avoid using 128bits just to represent an Option.
PartialCuTimeRange
Represents a time range with possible undefined start or end or both.
RobotClock
A running Robot clock. The clock is a monotonic clock that starts at an arbitrary reference time. It is clone resilient, ie a clone will be the same clock, even when mocked.
RobotClockMock
A mock clock that can be controlled by the user.

Enums§

Tov
The time of validity of a message can be more than one time but can be a time range of Tovs. diff --git a/cu29_clock/struct.CuDuration.html b/cu29_clock/struct.CuDuration.html index c783be2eb..ba9658f94 100644 --- a/cu29_clock/struct.CuDuration.html +++ b/cu29_clock/struct.CuDuration.html @@ -1,4 +1,4 @@ -CuDuration in cu29_clock - Rust

Struct CuDuration

Source
pub struct CuDuration(pub u64);
Expand description

For Robot times, the underlying type is a u64 representing nanoseconds. +CuDuration in cu29_clock - Rust

Struct CuDuration

Source
pub struct CuDuration(pub u64);
Expand description

For Robot times, the underlying type is a u64 representing nanoseconds. It is always positive to simplify the reasoning on the user side.

Tuple Fields§

§0: u64

Implementations§

Source§

impl CuDuration

Source

pub const MIN: CuDuration

Source

pub const MAX: CuDuration

Source

pub fn max(&self, p0: CuDuration) -> CuDuration

Source

pub fn min(&self, p0: CuDuration) -> CuDuration

Source

pub fn as_nanos(&self) -> u64

Trait Implementations§

Source§

impl Add for CuDuration

Source§

type Output = CuDuration

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for CuDuration

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<'de> BorrowDecode<'de> for CuDuration

Source§

fn borrow_decode<D: BorrowDecoder<'de>>( decoder: &mut D, @@ -6,13 +6,13 @@ __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for CuDuration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Div<T> for CuDuration
where T: Into<u64>,

Source§

type Output = CuDuration

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self

Performs the / operation. Read more
Source§

impl Encode for CuDuration

Source§

fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), EncodeError>

Encode a given type.
Source§

impl From<CuDuration> for Duration

Source§

fn from(val: CuDuration) -> Self

Converts to this type from the input type.
Source§

impl From<CuDuration> for OptionCuTime

Source§

fn from(val: CuTime) -> Self

Converts to this type from the input type.
Source§

impl From<CuDuration> for Tov

Source§

fn from(duration: CuDuration) -> Self

Converts to this type from the input type.
Source§

impl From<CuDuration> for u64

Source§

fn from(val: CuDuration) -> Self

Converts to this type from the input type.
Source§

impl From<Duration> for CuDuration

bridge the API with standard Durations.

Source§

fn from(duration: Duration) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for CuDuration

Source§

fn from(duration: u64) -> Self

Converts to this type from the input type.
Source§

impl Mul<CuDuration> for i32

Source§

type Output = CuDuration

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CuDuration) -> CuDuration

Performs the * operation. Read more
Source§

impl Mul<CuDuration> for u32

Source§

type Output = CuDuration

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CuDuration) -> CuDuration

Performs the * operation. Read more
Source§

impl Mul<CuDuration> for u64

Source§

type Output = CuDuration

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CuDuration) -> CuDuration

Performs the * operation. Read more
Source§

impl<T> Mul<T> for CuDuration
where - T: Into<u64>,

Source§

type Output = CuDuration

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> CuDuration

Performs the * operation. Read more
Source§

impl Ord for CuDuration

Source§

fn cmp(&self, other: &CuDuration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where + T: Into<u64>,

Source§

type Output = CuDuration

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> CuDuration

Performs the * operation. Read more
Source§

impl Ord for CuDuration

Source§

fn cmp(&self, other: &CuDuration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for CuDuration

Source§

fn eq(&self, other: &CuDuration) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl PartialOrd for CuDuration

Source§

fn partial_cmp(&self, other: &CuDuration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > -operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +and should not be overridden without very good reason.
Source§

impl PartialOrd for CuDuration

Source§

fn partial_cmp(&self, other: &CuDuration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for CuDuration

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Sub for CuDuration

Source§

type Output = CuDuration

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for CuDuration

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl Copy for CuDuration

Source§

impl Eq for CuDuration

Source§

impl StructuralPartialEq for CuDuration

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29_clock/struct.CuTimeRange.html b/cu29_clock/struct.CuTimeRange.html index 6e4c95d80..84ab0cf87 100644 --- a/cu29_clock/struct.CuTimeRange.html +++ b/cu29_clock/struct.CuTimeRange.html @@ -1,4 +1,4 @@ -CuTimeRange in cu29_clock - Rust

Struct CuTimeRange

Source
pub struct CuTimeRange {
+CuTimeRange in cu29_clock - Rust

Struct CuTimeRange

Source
pub struct CuTimeRange {
     pub start: CuTime,
     pub end: CuTime,
 }
Expand description

Represents a time range.

diff --git a/cu29_clock/struct.Instant.html b/cu29_clock/struct.Instant.html index 8bf684029..16013216d 100644 --- a/cu29_clock/struct.Instant.html +++ b/cu29_clock/struct.Instant.html @@ -1,4 +1,4 @@ -Instant in cu29_clock - Rust

Struct Instant

pub struct Instant(/* private fields */);
Expand description

A point-in-time wall-clock measurement.

+Instant in cu29_clock - Rust

Struct Instant

pub struct Instant(/* private fields */);
Expand description

A point-in-time wall-clock measurement.

Mimics most of the functionality of std::time::Instant but provides an additional method for using the “recent time” feature of quanta.

§Monotonicity

@@ -94,13 +94,13 @@
§Examples

Trait Implementations§

§

impl Add<Duration> for Instant

§

fn add(self, other: Duration) -> Instant

§Panics

This function may panic if the resulting point in time cannot be represented by the underlying data structure. See Instant::checked_add for a version without panic.

-
§

type Output = Instant

The resulting type after applying the + operator.
§

impl AddAssign<Duration> for Instant

§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
§

impl Clone for Instant

§

fn clone(&self) -> Instant

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Instant

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Ord for Instant

§

fn cmp(&self, other: &Instant) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where +

§

type Output = Instant

The resulting type after applying the + operator.
§

impl AddAssign<Duration> for Instant

§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
§

impl Clone for Instant

§

fn clone(&self) -> Instant

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Instant

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Ord for Instant

§

fn cmp(&self, other: &Instant) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Instant

§

fn eq(&self, other: &Instant) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
§

impl PartialOrd for Instant

§

fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > -operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +and should not be overridden without very good reason.
§

impl PartialOrd for Instant

§

fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
§

impl Sub for Instant

§

fn sub(self, other: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

§Panics
diff --git a/cu29_clock/struct.OptionCuTime.html b/cu29_clock/struct.OptionCuTime.html index de5a6e9a1..a771812ff 100644 --- a/cu29_clock/struct.OptionCuTime.html +++ b/cu29_clock/struct.OptionCuTime.html @@ -1,4 +1,4 @@ -OptionCuTime in cu29_clock - Rust

Struct OptionCuTime

Source
pub struct OptionCuTime(/* private fields */);
Expand description

Homebrewed Option<CuDuration> to avoid using 128bits just to represent an Option.

+OptionCuTime in cu29_clock - Rust

Struct OptionCuTime

Source
pub struct OptionCuTime(/* private fields */);
Expand description

Homebrewed Option<CuDuration> to avoid using 128bits just to represent an Option.

Implementations§

Source§

impl OptionCuTime

Source

pub fn is_none(&self) -> bool

Source

pub fn none() -> Self

Source

pub fn unwrap(self) -> CuTime

Trait Implementations§

Source§

impl<'__de> BorrowDecode<'__de> for OptionCuTime

Source§

fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given BorrowDecode.
Source§

impl Clone for OptionCuTime

Source§

fn clone(&self) -> OptionCuTime

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OptionCuTime

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Decode for OptionCuTime

Source§

fn decode<__D: Decoder>(decoder: &mut __D) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
Source§

impl Default for OptionCuTime

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for OptionCuTime

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where diff --git a/cu29_clock/struct.PartialCuTimeRange.html b/cu29_clock/struct.PartialCuTimeRange.html index 86762ea75..7db9ce13c 100644 --- a/cu29_clock/struct.PartialCuTimeRange.html +++ b/cu29_clock/struct.PartialCuTimeRange.html @@ -1,4 +1,4 @@ -PartialCuTimeRange in cu29_clock - Rust

Struct PartialCuTimeRange

Source
pub struct PartialCuTimeRange {
+PartialCuTimeRange in cu29_clock - Rust

Struct PartialCuTimeRange

Source
pub struct PartialCuTimeRange {
     pub start: OptionCuTime,
     pub end: OptionCuTime,
 }
Expand description

Represents a time range with possible undefined start or end or both.

diff --git a/cu29_clock/struct.RobotClock.html b/cu29_clock/struct.RobotClock.html index 8d96cdd25..f3a92997b 100644 --- a/cu29_clock/struct.RobotClock.html +++ b/cu29_clock/struct.RobotClock.html @@ -1,4 +1,4 @@ -RobotClock in cu29_clock - Rust

Struct RobotClock

Source
pub struct RobotClock { /* private fields */ }
Expand description

A running Robot clock. +RobotClock in cu29_clock - Rust

Struct RobotClock

Source
pub struct RobotClock { /* private fields */ }
Expand description

A running Robot clock. The clock is a monotonic clock that starts at an arbitrary reference time. It is clone resilient, ie a clone will be the same clock, even when mocked.

Implementations§

Source§

impl RobotClock

Source

pub fn new() -> Self

Creates a RobotClock using now as its reference time. diff --git a/cu29_clock/struct.RobotClockMock.html b/cu29_clock/struct.RobotClockMock.html index 68c81741f..72621cece 100644 --- a/cu29_clock/struct.RobotClockMock.html +++ b/cu29_clock/struct.RobotClockMock.html @@ -1,4 +1,4 @@ -RobotClockMock in cu29_clock - Rust

Struct RobotClockMock

Source
pub struct RobotClockMock(/* private fields */);
Expand description

A mock clock that can be controlled by the user.

+RobotClockMock in cu29_clock - Rust

Struct RobotClockMock

Source
pub struct RobotClockMock(/* private fields */);
Expand description

A mock clock that can be controlled by the user.

Implementations§

Source§

impl RobotClockMock

Source

pub fn increment(&self, amount: Duration)

Source

pub fn decrement(&self, amount: Duration)

Decrements the time by the given amount. Be careful this brakes the monotonicity of the clock.

Source

pub fn value(&self) -> u64

Gets the current value of time.

diff --git a/cu29_clock/trait.ClockProvider.html b/cu29_clock/trait.ClockProvider.html index bd7ea8d34..b5fdfb0c9 100644 --- a/cu29_clock/trait.ClockProvider.html +++ b/cu29_clock/trait.ClockProvider.html @@ -1,4 +1,4 @@ -ClockProvider in cu29_clock - Rust

Trait ClockProvider

Source
pub trait ClockProvider {
+ClockProvider in cu29_clock - Rust

Trait ClockProvider

Source
pub trait ClockProvider {
     // Required method
     fn get_clock(&self) -> RobotClock;
 }
Expand description

A trait to provide a clock to the runtime.

diff --git a/cu29_clock/type.CuTime.html b/cu29_clock/type.CuTime.html index 9e6001ad1..090a0d9f7 100644 --- a/cu29_clock/type.CuTime.html +++ b/cu29_clock/type.CuTime.html @@ -1,2 +1,2 @@ -CuTime in cu29_clock - Rust

Type Alias CuTime

Source
pub type CuTime = CuDuration;
Expand description

A robot time is just a duration from a fixed point in time.

+CuTime in cu29_clock - Rust

Type Alias CuTime

Source
pub type CuTime = CuDuration;
Expand description

A robot time is just a duration from a fixed point in time.

Aliased Type§

struct CuTime(pub u64);

Fields§

§0: u64
\ No newline at end of file diff --git a/cu29_derive/all.html b/cu29_derive/all.html index d59c21355..453835c56 100644 --- a/cu29_derive/all.html +++ b/cu29_derive/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Macros

Attribute Macros

\ No newline at end of file +List of all items in this crate

List of all items

Macros

Attribute Macros

\ No newline at end of file diff --git a/cu29_derive/attr.copper_runtime.html b/cu29_derive/attr.copper_runtime.html index 97bc7b9c7..2be67d3d5 100644 --- a/cu29_derive/attr.copper_runtime.html +++ b/cu29_derive/attr.copper_runtime.html @@ -1,4 +1,4 @@ -copper_runtime in cu29_derive - Rust

Attribute Macro copper_runtime

Source
#[copper_runtime]
Expand description

Adds #[copper_runtime(config = “path”, sim_mode = false/true)] to your application struct to generate the runtime. +copper_runtime in cu29_derive - Rust

Attribute Macro copper_runtime

Source
#[copper_runtime]
Expand description

Adds #[copper_runtime(config = “path”, sim_mode = false/true)] to your application struct to generate the runtime. if sim_mode is omitted, it is set to false. This will add a “runtime” field to your struct and implement the “new” and “run” methods.

\ No newline at end of file diff --git a/cu29_derive/index.html b/cu29_derive/index.html index 3808f248c..652078605 100644 --- a/cu29_derive/index.html +++ b/cu29_derive/index.html @@ -1,4 +1,4 @@ -cu29_derive - Rust

Crate cu29_derive

Source

Macros§

gen_cumsgs
Generates the CopperList content type from a config. +cu29_derive - Rust

Crate cu29_derive

Source

Macros§

gen_cumsgs
Generates the CopperList content type from a config. gen_cumsgs!(“path/to/config.toml”) It will create a new type called CuMsgs you can pass to the log reader for decoding:

Attribute Macros§

copper_runtime
Adds #[copper_runtime(config = “path”, sim_mode = false/true)] to your application struct to generate the runtime. if sim_mode is omitted, it is set to false. diff --git a/cu29_derive/macro.gen_cumsgs.html b/cu29_derive/macro.gen_cumsgs.html index 4e6ccc904..2f891562e 100644 --- a/cu29_derive/macro.gen_cumsgs.html +++ b/cu29_derive/macro.gen_cumsgs.html @@ -1,4 +1,4 @@ -gen_cumsgs in cu29_derive - Rust

Macro gen_cumsgs

Source
gen_cumsgs!() { /* proc-macro */ }
Expand description

Generates the CopperList content type from a config. +gen_cumsgs in cu29_derive - Rust

Macro gen_cumsgs

Source
gen_cumsgs!() { /* proc-macro */ }
Expand description

Generates the CopperList content type from a config. gen_cumsgs!(“path/to/config.toml”) It will create a new type called CuMsgs you can pass to the log reader for decoding:

\ No newline at end of file diff --git a/cu29_export/all.html b/cu29_export/all.html index 9236cc8c1..d8ef3b8db 100644 --- a/cu29_export/all.html +++ b/cu29_export/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/cu29_export/enum.Command.html b/cu29_export/enum.Command.html index 32f747b43..2e95bd66f 100644 --- a/cu29_export/enum.Command.html +++ b/cu29_export/enum.Command.html @@ -1,4 +1,4 @@ -Command in cu29_export - Rust

Enum Command

Source
pub enum Command {
+Command in cu29_export - Rust

Enum Command

Source
pub enum Command {
     ExtractLog {
         log_index: PathBuf,
     },
diff --git a/cu29_export/enum.ExportFormat.html b/cu29_export/enum.ExportFormat.html
index 025e88d0a..e0987dbf7 100644
--- a/cu29_export/enum.ExportFormat.html
+++ b/cu29_export/enum.ExportFormat.html
@@ -1,13 +1,13 @@
-ExportFormat in cu29_export - Rust

Enum ExportFormat

Source
pub enum ExportFormat {
+ExportFormat in cu29_export - Rust

Enum ExportFormat

Source
pub enum ExportFormat {
     Json,
     Csv,
-}

Variants§

§

Json

§

Csv

Trait Implementations§

Source§

impl Clone for ExportFormat

Source§

fn clone(&self) -> ExportFormat

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Display for ExportFormat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Ord for ExportFormat

Source§

fn cmp(&self, other: &ExportFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where +}

Variants§

§

Json

§

Csv

Trait Implementations§

Source§

impl Clone for ExportFormat

Source§

fn clone(&self) -> ExportFormat

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Display for ExportFormat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Ord for ExportFormat

Source§

fn cmp(&self, other: &ExportFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ExportFormat

Source§

fn eq(&self, other: &ExportFormat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl PartialOrd for ExportFormat

Source§

fn partial_cmp(&self, other: &ExportFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > -operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +and should not be overridden without very good reason.
Source§

impl PartialOrd for ExportFormat

Source§

fn partial_cmp(&self, other: &ExportFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ValueEnum for ExportFormat

Source§

fn value_variants<'a>() -> &'a [Self]

All possible argument values, in display order.
Source§

fn to_possible_value<'a>(&self) -> Option<PossibleValue>

The canonical argument value. Read more
§

fn from_str(input: &str, ignore_case: bool) -> Result<Self, String>

Parse an argument into Self.
Source§

impl Copy for ExportFormat

Source§

impl Eq for ExportFormat

Source§

impl StructuralPartialEq for ExportFormat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where diff --git a/cu29_export/fn.copperlists_dump.html b/cu29_export/fn.copperlists_dump.html index 69fe0e663..3a31683c6 100644 --- a/cu29_export/fn.copperlists_dump.html +++ b/cu29_export/fn.copperlists_dump.html @@ -1,4 +1,4 @@ -copperlists_dump in cu29_export - Rust

Function copperlists_dump

Source
pub fn copperlists_dump<P: CopperListTuple>(
+copperlists_dump in cu29_export - Rust

Function copperlists_dump

Source
pub fn copperlists_dump<P: CopperListTuple>(
     src: impl Read,
 ) -> impl Iterator<Item = CopperList<P>>
Expand description

Extracts the copper lists from a binary representation. P is the Payload determined by the configuration of the application.

diff --git a/cu29_export/fn.run_cli.html b/cu29_export/fn.run_cli.html index eb472fbfd..c79e941db 100644 --- a/cu29_export/fn.run_cli.html +++ b/cu29_export/fn.run_cli.html @@ -1,4 +1,4 @@ -run_cli in cu29_export - Rust

Function run_cli

Source
pub fn run_cli<P>() -> CuResult<()>
where +run_cli in cu29_export - Rust

Function run_cli

Source
pub fn run_cli<P>() -> CuResult<()>
where P: CopperListTuple,
Expand description

This is a generator for a main function to build a log extractor. It depends on the specific type of the CopperList payload that is determined at compile time from the configuration.

\ No newline at end of file diff --git a/cu29_export/fn.textlog_dump.html b/cu29_export/fn.textlog_dump.html index 289a88152..50886b7df 100644 --- a/cu29_export/fn.textlog_dump.html +++ b/cu29_export/fn.textlog_dump.html @@ -1,4 +1,4 @@ -textlog_dump in cu29_export - Rust

Function textlog_dump

Source
pub fn textlog_dump(src: impl Read, index: &Path) -> CuResult<()>
Expand description

Full dump of the copper structured log from its binary representation. +textlog_dump in cu29_export - Rust

Function textlog_dump

Source
pub fn textlog_dump(src: impl Read, index: &Path) -> CuResult<()>
Expand description

Full dump of the copper structured log from its binary representation. This rebuilds a textual log. src: the source of the log data index: the path to the index file (containing the interned strings constructed at build time)

diff --git a/cu29_export/index.html b/cu29_export/index.html index d1068f6ea..73c844e54 100644 --- a/cu29_export/index.html +++ b/cu29_export/index.html @@ -1,4 +1,4 @@ -cu29_export - Rust

Crate cu29_export

Source

Structs§

LogReaderCli
This is a generator for a main function to build a log extractor.

Enums§

Command
ExportFormat

Functions§

copperlists_dump
Extracts the copper lists from a binary representation. +cu29_export - Rust

Crate cu29_export

Source

Structs§

LogReaderCli
This is a generator for a main function to build a log extractor.

Enums§

Command
ExportFormat

Functions§

copperlists_dump
Extracts the copper lists from a binary representation. P is the Payload determined by the configuration of the application.
run_cli
This is a generator for a main function to build a log extractor. It depends on the specific type of the CopperList payload that is determined at compile time from the configuration.
textlog_dump
Full dump of the copper structured log from its binary representation. This rebuilds a textual log. diff --git a/cu29_export/struct.LogReaderCli.html b/cu29_export/struct.LogReaderCli.html index 246bad24b..ed1967320 100644 --- a/cu29_export/struct.LogReaderCli.html +++ b/cu29_export/struct.LogReaderCli.html @@ -1,4 +1,4 @@ -LogReaderCli in cu29_export - Rust

Struct LogReaderCli

Source
pub struct LogReaderCli {
+LogReaderCli in cu29_export - Rust

Struct LogReaderCli

Source
pub struct LogReaderCli {
     pub unifiedlog_base: PathBuf,
     pub command: Command,
 }
Expand description

This is a generator for a main function to build a log extractor.

diff --git a/cu29_helpers/all.html b/cu29_helpers/all.html index 5a7423fca..2d7da937a 100644 --- a/cu29_helpers/all.html +++ b/cu29_helpers/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Functions

\ No newline at end of file +List of all items in this crate

List of all items

Functions

\ No newline at end of file diff --git a/cu29_helpers/fn.basic_copper_setup.html b/cu29_helpers/fn.basic_copper_setup.html index f3df114c6..d37a77516 100644 --- a/cu29_helpers/fn.basic_copper_setup.html +++ b/cu29_helpers/fn.basic_copper_setup.html @@ -1,4 +1,4 @@ -basic_copper_setup in cu29_helpers - Rust

Function basic_copper_setup

Source
pub fn basic_copper_setup(
+basic_copper_setup in cu29_helpers - Rust

Function basic_copper_setup

Source
pub fn basic_copper_setup(
     unifiedlogger_output_base_name: &Path,
     slab_size: Option<usize>,
     _text_log: bool,
diff --git a/cu29_helpers/index.html b/cu29_helpers/index.html
index b9b105cd0..6d8ffaae9 100644
--- a/cu29_helpers/index.html
+++ b/cu29_helpers/index.html
@@ -1,2 +1,2 @@
-cu29_helpers - Rust

Crate cu29_helpers

Source

Functions§

basic_copper_setup
This is a basic setup for a copper application to get you started. +cu29_helpers - Rust

Crate cu29_helpers

Source

Functions§

basic_copper_setup
This is a basic setup for a copper application to get you started. Duplicate and customize as needed when your needs grow.
\ No newline at end of file diff --git a/cu29_intern_strs/all.html b/cu29_intern_strs/all.html index a41c17774..eefc9945d 100644 --- a/cu29_intern_strs/all.html +++ b/cu29_intern_strs/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Functions

\ No newline at end of file +List of all items in this crate

List of all items

Functions

\ No newline at end of file diff --git a/cu29_intern_strs/fn.read_interned_strings.html b/cu29_intern_strs/fn.read_interned_strings.html index a5175331b..2ebeff874 100644 --- a/cu29_intern_strs/fn.read_interned_strings.html +++ b/cu29_intern_strs/fn.read_interned_strings.html @@ -1,2 +1,2 @@ -read_interned_strings in cu29_intern_strs - Rust

Function read_interned_strings

Source
pub fn read_interned_strings(index: &Path) -> CuResult<Vec<String>>
Expand description

Rebuild the interned string index in memory.

+read_interned_strings in cu29_intern_strs - Rust

Function read_interned_strings

Source
pub fn read_interned_strings(index: &Path) -> CuResult<Vec<String>>
Expand description

Rebuild the interned string index in memory.

\ No newline at end of file diff --git a/cu29_intern_strs/index.html b/cu29_intern_strs/index.html index a1d56468d..486bd8846 100644 --- a/cu29_intern_strs/index.html +++ b/cu29_intern_strs/index.html @@ -1 +1 @@ -cu29_intern_strs - Rust

Crate cu29_intern_strs

Source

Functions§

read_interned_strings
Rebuild the interned string index in memory.
\ No newline at end of file +cu29_intern_strs - Rust

Crate cu29_intern_strs

Source

Functions§

read_interned_strings
Rebuild the interned string index in memory.
\ No newline at end of file diff --git a/cu29_log/all.html b/cu29_log/all.html index 4cf1c7232..25b541884 100644 --- a/cu29_log/all.html +++ b/cu29_log/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/cu29_log/constant.ANONYMOUS.html b/cu29_log/constant.ANONYMOUS.html index e5154af0b..21c9a91fb 100644 --- a/cu29_log/constant.ANONYMOUS.html +++ b/cu29_log/constant.ANONYMOUS.html @@ -1 +1 @@ -ANONYMOUS in cu29_log - Rust

Constant ANONYMOUS

Source
pub const ANONYMOUS: u32 = 0;
\ No newline at end of file +ANONYMOUS in cu29_log - Rust

Constant ANONYMOUS

Source
pub const ANONYMOUS: u32 = 0;
\ No newline at end of file diff --git a/cu29_log/constant.MAX_LOG_PARAMS_ON_STACK.html b/cu29_log/constant.MAX_LOG_PARAMS_ON_STACK.html index 3c74d3761..cd8f94194 100644 --- a/cu29_log/constant.MAX_LOG_PARAMS_ON_STACK.html +++ b/cu29_log/constant.MAX_LOG_PARAMS_ON_STACK.html @@ -1 +1 @@ -MAX_LOG_PARAMS_ON_STACK in cu29_log - Rust

Constant MAX_LOG_PARAMS_ON_STACK

Source
pub const MAX_LOG_PARAMS_ON_STACK: usize = 10;
\ No newline at end of file +MAX_LOG_PARAMS_ON_STACK in cu29_log - Rust

Constant MAX_LOG_PARAMS_ON_STACK

Source
pub const MAX_LOG_PARAMS_ON_STACK: usize = 10;
\ No newline at end of file diff --git a/cu29_log/fn.default_log_index_dir.html b/cu29_log/fn.default_log_index_dir.html index ba99fba9d..e97c9dc27 100644 --- a/cu29_log/fn.default_log_index_dir.html +++ b/cu29_log/fn.default_log_index_dir.html @@ -1,2 +1,2 @@ -default_log_index_dir in cu29_log - Rust

Function default_log_index_dir

Source
pub fn default_log_index_dir() -> PathBuf
Expand description

Convenience function to returns the default path for the log index directory.

+default_log_index_dir in cu29_log - Rust

Function default_log_index_dir

Source
pub fn default_log_index_dir() -> PathBuf
Expand description

Convenience function to returns the default path for the log index directory.

\ No newline at end of file diff --git a/cu29_log/fn.format_logline.html b/cu29_log/fn.format_logline.html index c70fad169..05dc6f5ec 100644 --- a/cu29_log/fn.format_logline.html +++ b/cu29_log/fn.format_logline.html @@ -1,4 +1,4 @@ -format_logline in cu29_log - Rust

Function format_logline

Source
pub fn format_logline(
+format_logline in cu29_log - Rust

Function format_logline

Source
pub fn format_logline(
     time: CuTime,
     format_str: &str,
     params: &[String],
diff --git a/cu29_log/fn.rebuild_logline.html b/cu29_log/fn.rebuild_logline.html
index eecf13ead..3b6757c90 100644
--- a/cu29_log/fn.rebuild_logline.html
+++ b/cu29_log/fn.rebuild_logline.html
@@ -1,4 +1,4 @@
-rebuild_logline in cu29_log - Rust

Function rebuild_logline

Source
pub fn rebuild_logline(
+rebuild_logline in cu29_log - Rust

Function rebuild_logline

Source
pub fn rebuild_logline(
     all_interned_strings: &[String],
     entry: &CuLogEntry,
 ) -> CuResult<String>
Expand description

Rebuild a log line from the interned strings and the CuLogEntry. diff --git a/cu29_log/index.html b/cu29_log/index.html index 4a7dfd0f3..f0cfa1c77 100644 --- a/cu29_log/index.html +++ b/cu29_log/index.html @@ -1,2 +1,2 @@ -cu29_log - Rust

Crate cu29_log

Source

Structs§

CuLogEntry
This is the basic structure for a log entry in Copper.

Constants§

ANONYMOUS
MAX_LOG_PARAMS_ON_STACK

Functions§

default_log_index_dir
Convenience function to returns the default path for the log index directory.
format_logline
Text log line formatter.
rebuild_logline
Rebuild a log line from the interned strings and the CuLogEntry. +cu29_log - Rust

Crate cu29_log

Source

Structs§

CuLogEntry
This is the basic structure for a log entry in Copper.

Constants§

ANONYMOUS
MAX_LOG_PARAMS_ON_STACK

Functions§

default_log_index_dir
Convenience function to returns the default path for the log index directory.
format_logline
Text log line formatter.
rebuild_logline
Rebuild a log line from the interned strings and the CuLogEntry. This basically translates the world of copper logs to text logs.
\ No newline at end of file diff --git a/cu29_log/struct.CuLogEntry.html b/cu29_log/struct.CuLogEntry.html index 6d33693d8..7f3eb595a 100644 --- a/cu29_log/struct.CuLogEntry.html +++ b/cu29_log/struct.CuLogEntry.html @@ -1,4 +1,4 @@ -CuLogEntry in cu29_log - Rust

Struct CuLogEntry

Source
pub struct CuLogEntry {
+CuLogEntry in cu29_log - Rust

Struct CuLogEntry

Source
pub struct CuLogEntry {
     pub time: CuTime,
     pub msg_index: u32,
     pub paramname_indexes: SmallVec<[u32; 10]>,
diff --git a/cu29_log_derive/all.html b/cu29_log_derive/all.html
index 0d4ba7436..45b4ef2f2 100644
--- a/cu29_log_derive/all.html
+++ b/cu29_log_derive/all.html
@@ -1 +1 @@
-List of all items in this crate

List of all items

Macros

\ No newline at end of file +List of all items in this crate

List of all items

Macros

\ No newline at end of file diff --git a/cu29_log_derive/index.html b/cu29_log_derive/index.html index b2b00d3ee..36707b16a 100644 --- a/cu29_log_derive/index.html +++ b/cu29_log_derive/index.html @@ -1,4 +1,4 @@ -cu29_log_derive - Rust

Crate cu29_log_derive

Source

Macros§

debug
This macro is used to log a message with parameters. +cu29_log_derive - Rust

Crate cu29_log_derive

Source

Macros§

debug
This macro is used to log a message with parameters. The first parameter is a string literal that represents the message to be logged. Only {} is supported as a placeholder for parameters. The rest of the parameters are the values to be logged. diff --git a/cu29_log_derive/macro.debug.html b/cu29_log_derive/macro.debug.html index 77932f186..e8b872b7e 100644 --- a/cu29_log_derive/macro.debug.html +++ b/cu29_log_derive/macro.debug.html @@ -1,4 +1,4 @@ -debug in cu29_log_derive - Rust

Macro debug

Source
debug!() { /* proc-macro */ }
Expand description

This macro is used to log a message with parameters. +debug in cu29_log_derive - Rust

Macro debug

Source
debug!() { /* proc-macro */ }
Expand description

This macro is used to log a message with parameters. The first parameter is a string literal that represents the message to be logged. Only {} is supported as a placeholder for parameters. The rest of the parameters are the values to be logged. diff --git a/cu29_log_runtime/all.html b/cu29_log_runtime/all.html index 878667432..77809939d 100644 --- a/cu29_log_runtime/all.html +++ b/cu29_log_runtime/all.html @@ -1 +1 @@ -List of all items in this crate

\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/cu29_log_runtime/fn.log.html b/cu29_log_runtime/fn.log.html index 6a52a975a..ffe886d0f 100644 --- a/cu29_log_runtime/fn.log.html +++ b/cu29_log_runtime/fn.log.html @@ -1,3 +1,3 @@ -log in cu29_log_runtime - Rust

Function log

Source
pub fn log(entry: &mut CuLogEntry) -> CuResult<()>
Expand description

Function called from generated code to log data. +log in cu29_log_runtime - Rust

Function log

Source
pub fn log(entry: &mut CuLogEntry) -> CuResult<()>
Expand description

Function called from generated code to log data. It moves entry by design, it will be absorbed in the queue.

\ No newline at end of file diff --git a/cu29_log_runtime/fn.log_debug_mode.html b/cu29_log_runtime/fn.log_debug_mode.html index 7f2e485c1..75a70763e 100644 --- a/cu29_log_runtime/fn.log_debug_mode.html +++ b/cu29_log_runtime/fn.log_debug_mode.html @@ -1,4 +1,4 @@ -log_debug_mode in cu29_log_runtime - Rust

Function log_debug_mode

Source
pub fn log_debug_mode(
+log_debug_mode in cu29_log_runtime - Rust

Function log_debug_mode

Source
pub fn log_debug_mode(
     entry: &mut CuLogEntry,
     format_str: &str,
     param_names: &[&str],
diff --git a/cu29_log_runtime/index.html b/cu29_log_runtime/index.html
index f6d9c2854..4bb06a50c 100644
--- a/cu29_log_runtime/index.html
+++ b/cu29_log_runtime/index.html
@@ -1,3 +1,3 @@
-cu29_log_runtime - Rust

Crate cu29_log_runtime

Source

Structs§

LoggerRuntime
The lifetime of this struct is the lifetime of the logger.
NullLog
OwningIoWriter
SimpleFileWriter
This allows this crate to be used outside of Copper (ie. decoupling it from the unifiedlog.

Statics§

EXTRA_TEXT_LOGGER

Functions§

log
Function called from generated code to log data. +cu29_log_runtime - Rust

Crate cu29_log_runtime

Source

Structs§

LoggerRuntime
The lifetime of this struct is the lifetime of the logger.
NullLog
OwningIoWriter
SimpleFileWriter
This allows this crate to be used outside of Copper (ie. decoupling it from the unifiedlog.

Statics§

EXTRA_TEXT_LOGGER

Functions§

log
Function called from generated code to log data. It moves entry by design, it will be absorbed in the queue.
log_debug_mode
This version of log is only compiled in debug mode This allows a normal logging framework to be bridged.
\ No newline at end of file diff --git a/cu29_log_runtime/static.EXTRA_TEXT_LOGGER.html b/cu29_log_runtime/static.EXTRA_TEXT_LOGGER.html index 162330bc4..4bb37c1c7 100644 --- a/cu29_log_runtime/static.EXTRA_TEXT_LOGGER.html +++ b/cu29_log_runtime/static.EXTRA_TEXT_LOGGER.html @@ -1 +1 @@ -EXTRA_TEXT_LOGGER in cu29_log_runtime - Rust

Static EXTRA_TEXT_LOGGER

Source
pub static EXTRA_TEXT_LOGGER: RwLock<Option<Box<dyn Log + 'static>>>
\ No newline at end of file +EXTRA_TEXT_LOGGER in cu29_log_runtime - Rust

Static EXTRA_TEXT_LOGGER

Source
pub static EXTRA_TEXT_LOGGER: RwLock<Option<Box<dyn Log + 'static>>>
\ No newline at end of file diff --git a/cu29_log_runtime/struct.LoggerRuntime.html b/cu29_log_runtime/struct.LoggerRuntime.html index dd9c44f75..9afe725c1 100644 --- a/cu29_log_runtime/struct.LoggerRuntime.html +++ b/cu29_log_runtime/struct.LoggerRuntime.html @@ -1,4 +1,4 @@ -LoggerRuntime in cu29_log_runtime - Rust

Struct LoggerRuntime

Source
pub struct LoggerRuntime {}
Expand description

The lifetime of this struct is the lifetime of the logger.

+LoggerRuntime in cu29_log_runtime - Rust

Struct LoggerRuntime

Source
pub struct LoggerRuntime {}
Expand description

The lifetime of this struct is the lifetime of the logger.

Implementations§

Source§

impl LoggerRuntime

Source

pub fn init( clock: RobotClock, destination: impl WriteStream<CuLogEntry> + 'static, diff --git a/cu29_log_runtime/struct.NullLog.html b/cu29_log_runtime/struct.NullLog.html index 03caec252..900ed59e5 100644 --- a/cu29_log_runtime/struct.NullLog.html +++ b/cu29_log_runtime/struct.NullLog.html @@ -1,4 +1,4 @@ -NullLog in cu29_log_runtime - Rust

Struct NullLog

Source
pub struct NullLog;

Trait Implementations§

Source§

impl Log for NullLog

Source§

fn enabled(&self, _metadata: &Metadata<'_>) -> bool

Determines if a log message with the specified metadata would be +NullLog in cu29_log_runtime - Rust

Struct NullLog

Source
pub struct NullLog;

Trait Implementations§

Source§

impl Log for NullLog

Source§

fn enabled(&self, _metadata: &Metadata<'_>) -> bool

Determines if a log message with the specified metadata would be logged. Read more
Source§

fn log(&self, _record: &Record<'_>)

Logs the Record. Read more
Source§

fn flush(&self)

Flushes any buffered records. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where diff --git a/cu29_log_runtime/struct.OwningIoWriter.html b/cu29_log_runtime/struct.OwningIoWriter.html index 9108c419b..7f3fc6c20 100644 --- a/cu29_log_runtime/struct.OwningIoWriter.html +++ b/cu29_log_runtime/struct.OwningIoWriter.html @@ -1,4 +1,4 @@ -OwningIoWriter in cu29_log_runtime - Rust

Struct OwningIoWriter

Source
pub struct OwningIoWriter<W: Write> { /* private fields */ }

Implementations§

Source§

impl<W: Write> OwningIoWriter<W>

Source

pub fn new(writer: W) -> Self

Source

pub fn bytes_written(&self) -> usize

Source

pub fn flush(&mut self) -> Result<(), EncodeError>

Trait Implementations§

Source§

impl<W: Write> Writer for OwningIoWriter<W>

Source§

fn write(&mut self, bytes: &[u8]) -> Result<(), EncodeError>

Write bytes to the underlying writer. Exactly bytes.len() bytes must be written, or else an error should be returned.

Auto Trait Implementations§

§

impl<W> Freeze for OwningIoWriter<W>
where +OwningIoWriter in cu29_log_runtime - Rust

Struct OwningIoWriter

Source
pub struct OwningIoWriter<W: Write> { /* private fields */ }

Implementations§

Source§

impl<W: Write> OwningIoWriter<W>

Source

pub fn new(writer: W) -> Self

Source

pub fn bytes_written(&self) -> usize

Source

pub fn flush(&mut self) -> Result<(), EncodeError>

Trait Implementations§

Source§

impl<W: Write> Writer for OwningIoWriter<W>

Source§

fn write(&mut self, bytes: &[u8]) -> Result<(), EncodeError>

Write bytes to the underlying writer. Exactly bytes.len() bytes must be written, or else an error should be returned.

Auto Trait Implementations§

§

impl<W> Freeze for OwningIoWriter<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for OwningIoWriter<W>
where W: RefUnwindSafe,

§

impl<W> Send for OwningIoWriter<W>
where W: Send,

§

impl<W> Sync for OwningIoWriter<W>
where diff --git a/cu29_log_runtime/struct.SimpleFileWriter.html b/cu29_log_runtime/struct.SimpleFileWriter.html index 1f55a54dd..71d62b689 100644 --- a/cu29_log_runtime/struct.SimpleFileWriter.html +++ b/cu29_log_runtime/struct.SimpleFileWriter.html @@ -1,4 +1,4 @@ -SimpleFileWriter in cu29_log_runtime - Rust

Struct SimpleFileWriter

Source
pub struct SimpleFileWriter { /* private fields */ }
Expand description

This allows this crate to be used outside of Copper (ie. decoupling it from the unifiedlog.

+SimpleFileWriter in cu29_log_runtime - Rust

Struct SimpleFileWriter

Source
pub struct SimpleFileWriter { /* private fields */ }
Expand description

This allows this crate to be used outside of Copper (ie. decoupling it from the unifiedlog.

Implementations§

Source§

impl SimpleFileWriter

Source

pub fn new(path: &PathBuf) -> CuResult<Self>

Trait Implementations§

Source§

impl Debug for SimpleFileWriter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl WriteStream<CuLogEntry> for SimpleFileWriter

Source§

fn log(&mut self, obj: &CuLogEntry) -> CuResult<()>

Source§

fn flush(&mut self) -> CuResult<()>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where diff --git a/cu29_rendercfg/all.html b/cu29_rendercfg/all.html index 930662417..54c1d6953 100644 --- a/cu29_rendercfg/all.html +++ b/cu29_rendercfg/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/cu29_rendercfg/config/fn.default_as_true.html b/cu29_rendercfg/config/fn.default_as_true.html index 0f175c629..c9297c34b 100644 --- a/cu29_rendercfg/config/fn.default_as_true.html +++ b/cu29_rendercfg/config/fn.default_as_true.html @@ -1 +1 @@ -default_as_true in cu29_rendercfg::config - Rust

Function default_as_true

Source
fn default_as_true() -> bool
\ No newline at end of file +default_as_true in cu29_rendercfg::config - Rust

Function default_as_true

Source
fn default_as_true() -> bool
\ No newline at end of file diff --git a/cu29_rendercfg/config/fn.read_configuration.html b/cu29_rendercfg/config/fn.read_configuration.html index 7dba249e0..14c6196f6 100644 --- a/cu29_rendercfg/config/fn.read_configuration.html +++ b/cu29_rendercfg/config/fn.read_configuration.html @@ -1,2 +1,2 @@ -read_configuration in cu29_rendercfg::config - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> CuResult<CuConfig>
Expand description

Read a copper configuration from a file.

+read_configuration in cu29_rendercfg::config - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> CuResult<CuConfig>
Expand description

Read a copper configuration from a file.

\ No newline at end of file diff --git a/cu29_rendercfg/config/fn.read_configuration_str.html b/cu29_rendercfg/config/fn.read_configuration_str.html index fd4b5775b..807b54d1d 100644 --- a/cu29_rendercfg/config/fn.read_configuration_str.html +++ b/cu29_rendercfg/config/fn.read_configuration_str.html @@ -1,2 +1,2 @@ -read_configuration_str in cu29_rendercfg::config - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(config_content: String) -> CuResult<CuConfig>
Expand description

Read a copper configuration from a String.

+read_configuration_str in cu29_rendercfg::config - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(config_content: String) -> CuResult<CuConfig>
Expand description

Read a copper configuration from a String.

\ No newline at end of file diff --git a/cu29_rendercfg/config/index.html b/cu29_rendercfg/config/index.html index 27a76a85c..eaa7201c3 100644 --- a/cu29_rendercfg/config/index.html +++ b/cu29_rendercfg/config/index.html @@ -1,4 +1,4 @@ -cu29_rendercfg::config - Rust

Module config

Source
Expand description

This module defines the configuration of the copper runtime. +cu29_rendercfg::config - Rust

Module config

Source
Expand description

This module defines the configuration of the copper runtime. The configuration is a directed graph where nodes are tasks and edges are connections between tasks. The configuration is serialized in the RON format. The configuration is used to generate the runtime code at compile time.

diff --git a/cu29_rendercfg/config/struct.Cnx.html b/cu29_rendercfg/config/struct.Cnx.html index 8d267b5dc..ead9ea622 100644 --- a/cu29_rendercfg/config/struct.Cnx.html +++ b/cu29_rendercfg/config/struct.Cnx.html @@ -1,4 +1,4 @@ -Cnx in cu29_rendercfg::config - Rust

Struct Cnx

Source
pub struct Cnx {
+Cnx in cu29_rendercfg::config - Rust

Struct Cnx

Source
pub struct Cnx {
     src: String,
     dst: String,
     pub msg: String,
diff --git a/cu29_rendercfg/config/struct.ComponentConfig.html b/cu29_rendercfg/config/struct.ComponentConfig.html
index 074dabf6f..4272b304a 100644
--- a/cu29_rendercfg/config/struct.ComponentConfig.html
+++ b/cu29_rendercfg/config/struct.ComponentConfig.html
@@ -1,4 +1,4 @@
-ComponentConfig in cu29_rendercfg::config - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w +ComponentConfig in cu29_rendercfg::config - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w It is a map of key-value pairs. It is given to the new method of the task implementation.

Tuple Fields§

§0: HashMap<String, Value>

Implementations§

Source§

impl ComponentConfig

Source

pub fn new() -> Self

Source

pub fn get<T: From<Value>>(&self, key: &str) -> Option<T>

Source

pub fn set<T: Into<Value>>(&mut self, key: &str, value: T)

Trait Implementations§

Source§

impl Clone for ComponentConfig

Source§

fn clone(&self) -> ComponentConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ComponentConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ComponentConfig

Source§

fn default() -> ComponentConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ComponentConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where diff --git a/cu29_rendercfg/config/struct.CuConfig.html b/cu29_rendercfg/config/struct.CuConfig.html index 9d720d616..e5c3b408c 100644 --- a/cu29_rendercfg/config/struct.CuConfig.html +++ b/cu29_rendercfg/config/struct.CuConfig.html @@ -1,4 +1,4 @@ -CuConfig in cu29_rendercfg::config - Rust

Struct CuConfig

Source
pub struct CuConfig {
+CuConfig in cu29_rendercfg::config - Rust

Struct CuConfig

Source
pub struct CuConfig {
     pub graph: StableDiGraph<Node, Cnx, u32>,
     pub monitor: Option<MonitorConfig>,
     pub logging: Option<LoggingConfig>,
diff --git a/cu29_rendercfg/config/struct.CuConfigRepresentation.html b/cu29_rendercfg/config/struct.CuConfigRepresentation.html
index 0c5661f56..1c9dd72ea 100644
--- a/cu29_rendercfg/config/struct.CuConfigRepresentation.html
+++ b/cu29_rendercfg/config/struct.CuConfigRepresentation.html
@@ -1,4 +1,4 @@
-CuConfigRepresentation in cu29_rendercfg::config - Rust

Struct CuConfigRepresentation

Source
struct CuConfigRepresentation {
+CuConfigRepresentation in cu29_rendercfg::config - Rust

Struct CuConfigRepresentation

Source
struct CuConfigRepresentation {
     tasks: Vec<Node>,
     cnx: Vec<Cnx>,
     monitor: Option<MonitorConfig>,
diff --git a/cu29_rendercfg/config/struct.LoggingConfig.html b/cu29_rendercfg/config/struct.LoggingConfig.html
index 708591912..18fbc03e4 100644
--- a/cu29_rendercfg/config/struct.LoggingConfig.html
+++ b/cu29_rendercfg/config/struct.LoggingConfig.html
@@ -1,4 +1,4 @@
-LoggingConfig in cu29_rendercfg::config - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
+LoggingConfig in cu29_rendercfg::config - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
     pub slab_size_mib: Option<u64>,
     pub section_size_mib: Option<u64>,
     pub enable_task_logging: bool,
diff --git a/cu29_rendercfg/config/struct.MonitorConfig.html b/cu29_rendercfg/config/struct.MonitorConfig.html
index 3928e8a66..34071e7ec 100644
--- a/cu29_rendercfg/config/struct.MonitorConfig.html
+++ b/cu29_rendercfg/config/struct.MonitorConfig.html
@@ -1,4 +1,4 @@
-MonitorConfig in cu29_rendercfg::config - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig {
+MonitorConfig in cu29_rendercfg::config - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig {
     type_: String,
     config: Option<ComponentConfig>,
 }

Fields§

§type_: String§config: Option<ComponentConfig>

Implementations§

Trait Implementations§

Source§

impl Clone for MonitorConfig

Source§

fn clone(&self) -> MonitorConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorConfig

Source§

fn default() -> MonitorConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where diff --git a/cu29_rendercfg/config/struct.Node.html b/cu29_rendercfg/config/struct.Node.html index 7caf591d8..11f8057a2 100644 --- a/cu29_rendercfg/config/struct.Node.html +++ b/cu29_rendercfg/config/struct.Node.html @@ -1,4 +1,4 @@ -Node in cu29_rendercfg::config - Rust

Struct Node

Source
pub struct Node {
+Node in cu29_rendercfg::config - Rust

Struct Node

Source
pub struct Node {
     id: String,
     type_: Option<String>,
     config: Option<ComponentConfig>,
diff --git a/cu29_rendercfg/config/struct.Value.html b/cu29_rendercfg/config/struct.Value.html
index 17aae4553..2b93385f3 100644
--- a/cu29_rendercfg/config/struct.Value.html
+++ b/cu29_rendercfg/config/struct.Value.html
@@ -1,4 +1,4 @@
-Value in cu29_rendercfg::config - Rust

Struct Value

Source
pub struct Value(Value);
Expand description

Wrapper around the ron::Value to allow for custom serialization.

+Value in cu29_rendercfg::config - Rust

Struct Value

Source
pub struct Value(Value);
Expand description

Wrapper around the ron::Value to allow for custom serialization.

Tuple Fields§

§0: Value

Trait Implementations§

Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Value

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<String> for Value

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for String

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for bool

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for f64

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for i32

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for u32

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for u8

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Value

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Value

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Value

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Value

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Value

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Value

Source§

fn eq(&self, other: &Value) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Value

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/cu29_rendercfg/config/type.NodeId.html b/cu29_rendercfg/config/type.NodeId.html index 51a356cf3..59403159f 100644 --- a/cu29_rendercfg/config/type.NodeId.html +++ b/cu29_rendercfg/config/type.NodeId.html @@ -1,3 +1,3 @@ -NodeId in cu29_rendercfg::config - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph +NodeId in cu29_rendercfg::config - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph and the code generation.

\ No newline at end of file diff --git a/cu29_rendercfg/enum.UnifiedLogType.html b/cu29_rendercfg/enum.UnifiedLogType.html index 938377c37..b8058f006 100644 --- a/cu29_rendercfg/enum.UnifiedLogType.html +++ b/cu29_rendercfg/enum.UnifiedLogType.html @@ -1,4 +1,4 @@ -UnifiedLogType in cu29_rendercfg - Rust

Enum UnifiedLogType

pub enum UnifiedLogType {
+UnifiedLogType in cu29_rendercfg - Rust

Enum UnifiedLogType

pub enum UnifiedLogType {
     Empty,
     StructuredLogLine,
     CopperList,
diff --git a/cu29_rendercfg/fn.main.html b/cu29_rendercfg/fn.main.html
index c600ac9e7..4b8b1b9dc 100644
--- a/cu29_rendercfg/fn.main.html
+++ b/cu29_rendercfg/fn.main.html
@@ -1,2 +1,2 @@
-main in cu29_rendercfg - Rust

Function main

Source
pub(crate) fn main() -> Result<()>
Expand description

Render the configuration file to a dot file then convert it to an SVG and optionally opens it with inkscape.

+main in cu29_rendercfg - Rust

Function main

Source
pub(crate) fn main() -> Result<()>
Expand description

Render the configuration file to a dot file then convert it to an SVG and optionally opens it with inkscape.

\ No newline at end of file diff --git a/cu29_rendercfg/index.html b/cu29_rendercfg/index.html index 5e013bfd9..8cc008691 100644 --- a/cu29_rendercfg/index.html +++ b/cu29_rendercfg/index.html @@ -1,4 +1,4 @@ -cu29_rendercfg - Rust

Crate cu29_rendercfg

Source

Modules§

config 🔒
This module defines the configuration of the copper runtime. +cu29_rendercfg - Rust

Crate cu29_rendercfg

Source

Modules§

config 🔒
This module defines the configuration of the copper runtime. The configuration is a directed graph where nodes are tasks and edges are connections between tasks. The configuration is serialized in the RON format. The configuration is used to generate the runtime code at compile time.

Structs§

Args 🔒
CuError
Common copper Error type.

Enums§

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

Traits§

CopperListTuple
A CopperListTuple needs to be encodable, decodable and fixed size in memory.
WriteStream
Defines a basic write, append only stream trait to be able to log or send serializable objects.

Functions§

main 🔒
Render the configuration file to a dot file then convert it to an SVG and optionally opens it with inkscape.

Type Aliases§

CuResult
\ No newline at end of file diff --git a/cu29_rendercfg/struct.Args.html b/cu29_rendercfg/struct.Args.html index 2a3b48088..9a1e4f121 100644 --- a/cu29_rendercfg/struct.Args.html +++ b/cu29_rendercfg/struct.Args.html @@ -1,4 +1,4 @@ -Args in cu29_rendercfg - Rust

Struct Args

Source
pub(crate) struct Args {
+Args in cu29_rendercfg - Rust

Struct Args

Source
pub(crate) struct Args {
     pub(crate) config: PathBuf,
     pub(crate) open: bool,
 }

Fields§

§config: PathBuf

Config file name

diff --git a/cu29_rendercfg/struct.CuError.html b/cu29_rendercfg/struct.CuError.html index 7b8a6262a..5f190786b 100644 --- a/cu29_rendercfg/struct.CuError.html +++ b/cu29_rendercfg/struct.CuError.html @@ -1,4 +1,4 @@ -CuError in cu29_rendercfg - Rust

Struct CuError

pub struct CuError {
+CuError in cu29_rendercfg - Rust

Struct CuError

pub struct CuError {
     pub(crate) message: String,
     pub(crate) cause: Option<String>,
 }
Expand description

Common copper Error type.

diff --git a/cu29_rendercfg/trait.CopperListTuple.html b/cu29_rendercfg/trait.CopperListTuple.html index e24558dba..131644be0 100644 --- a/cu29_rendercfg/trait.CopperListTuple.html +++ b/cu29_rendercfg/trait.CopperListTuple.html @@ -1,4 +1,4 @@ -CopperListTuple in cu29_rendercfg - Rust

Trait CopperListTuple

pub trait CopperListTuple:
+CopperListTuple in cu29_rendercfg - Rust

Trait CopperListTuple

pub trait CopperListTuple:
     Sized
     + Encode
     + Decode
diff --git a/cu29_rendercfg/trait.WriteStream.html b/cu29_rendercfg/trait.WriteStream.html
index bb875bab2..f52800279 100644
--- a/cu29_rendercfg/trait.WriteStream.html
+++ b/cu29_rendercfg/trait.WriteStream.html
@@ -1,4 +1,4 @@
-WriteStream in cu29_rendercfg - Rust

Trait WriteStream

pub trait WriteStream<E>:
+WriteStream in cu29_rendercfg - Rust

Trait WriteStream

pub trait WriteStream<E>:
     Sync
     + Send
     + Debug
where diff --git a/cu29_rendercfg/type.CuResult.html b/cu29_rendercfg/type.CuResult.html index 211047627..a4accecc6 100644 --- a/cu29_rendercfg/type.CuResult.html +++ b/cu29_rendercfg/type.CuResult.html @@ -1,4 +1,4 @@ -CuResult in cu29_rendercfg - Rust

Type Alias CuResult

pub type CuResult<T> = Result<T, CuError>;

Aliased Type§

enum CuResult<T> {
+CuResult in cu29_rendercfg - Rust

Type Alias CuResult

pub type CuResult<T> = Result<T, CuError>;

Aliased Type§

enum CuResult<T> {
     Ok(T),
     Err(CuError),
 }

Variants§

§1.0.0

Ok(T)

Contains the success value

diff --git a/cu29_runtime/all.html b/cu29_runtime/all.html index 2184a58d3..c86f265b7 100644 --- a/cu29_runtime/all.html +++ b/cu29_runtime/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/cu29_runtime/config/fn.read_configuration.html b/cu29_runtime/config/fn.read_configuration.html index 59fb4b81d..b0f36bb2d 100644 --- a/cu29_runtime/config/fn.read_configuration.html +++ b/cu29_runtime/config/fn.read_configuration.html @@ -1,2 +1,2 @@ -read_configuration in cu29_runtime::config - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> CuResult<CuConfig>
Expand description

Read a copper configuration from a file.

+read_configuration in cu29_runtime::config - Rust

Function read_configuration

Source
pub fn read_configuration(config_filename: &str) -> CuResult<CuConfig>
Expand description

Read a copper configuration from a file.

\ No newline at end of file diff --git a/cu29_runtime/config/fn.read_configuration_str.html b/cu29_runtime/config/fn.read_configuration_str.html index 8a6d527ec..be67c3e44 100644 --- a/cu29_runtime/config/fn.read_configuration_str.html +++ b/cu29_runtime/config/fn.read_configuration_str.html @@ -1,2 +1,2 @@ -read_configuration_str in cu29_runtime::config - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(config_content: String) -> CuResult<CuConfig>
Expand description

Read a copper configuration from a String.

+read_configuration_str in cu29_runtime::config - Rust

Function read_configuration_str

Source
pub fn read_configuration_str(config_content: String) -> CuResult<CuConfig>
Expand description

Read a copper configuration from a String.

\ No newline at end of file diff --git a/cu29_runtime/config/index.html b/cu29_runtime/config/index.html index 7a372cfeb..3b4d7ecf7 100644 --- a/cu29_runtime/config/index.html +++ b/cu29_runtime/config/index.html @@ -1,4 +1,4 @@ -cu29_runtime::config - Rust

Module config

Source
Expand description

This module defines the configuration of the copper runtime. +cu29_runtime::config - Rust

Module config

Source
Expand description

This module defines the configuration of the copper runtime. The configuration is a directed graph where nodes are tasks and edges are connections between tasks. The configuration is serialized in the RON format. The configuration is used to generate the runtime code at compile time.

diff --git a/cu29_runtime/config/struct.Cnx.html b/cu29_runtime/config/struct.Cnx.html index d4715be18..f7ab14930 100644 --- a/cu29_runtime/config/struct.Cnx.html +++ b/cu29_runtime/config/struct.Cnx.html @@ -1,4 +1,4 @@ -Cnx in cu29_runtime::config - Rust

Struct Cnx

Source
pub struct Cnx {
+Cnx in cu29_runtime::config - Rust

Struct Cnx

Source
pub struct Cnx {
     pub msg: String,
     pub batch: Option<u32>,
     pub store: Option<bool>,
diff --git a/cu29_runtime/config/struct.ComponentConfig.html b/cu29_runtime/config/struct.ComponentConfig.html
index 15c98a987..42fc75fbb 100644
--- a/cu29_runtime/config/struct.ComponentConfig.html
+++ b/cu29_runtime/config/struct.ComponentConfig.html
@@ -1,4 +1,4 @@
-ComponentConfig in cu29_runtime::config - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w +ComponentConfig in cu29_runtime::config - Rust

Struct ComponentConfig

Source
pub struct ComponentConfig(pub HashMap<String, Value>);
Expand description

This is the configuration of a component (like a task config or a monitoring config):w It is a map of key-value pairs. It is given to the new method of the task implementation.

Tuple Fields§

§0: HashMap<String, Value>

Implementations§

Source§

impl ComponentConfig

Source

pub fn new() -> Self

Source

pub fn get<T: From<Value>>(&self, key: &str) -> Option<T>

Source

pub fn set<T: Into<Value>>(&mut self, key: &str, value: T)

Trait Implementations§

Source§

impl Clone for ComponentConfig

Source§

fn clone(&self) -> ComponentConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ComponentConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ComponentConfig

Source§

fn default() -> ComponentConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ComponentConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where diff --git a/cu29_runtime/config/struct.CuConfig.html b/cu29_runtime/config/struct.CuConfig.html index 7d8f50d26..be01fdf6c 100644 --- a/cu29_runtime/config/struct.CuConfig.html +++ b/cu29_runtime/config/struct.CuConfig.html @@ -1,4 +1,4 @@ -CuConfig in cu29_runtime::config - Rust

Struct CuConfig

Source
pub struct CuConfig {
+CuConfig in cu29_runtime::config - Rust

Struct CuConfig

Source
pub struct CuConfig {
     pub graph: StableDiGraph<Node, Cnx, NodeId>,
     pub monitor: Option<MonitorConfig>,
     pub logging: Option<LoggingConfig>,
diff --git a/cu29_runtime/config/struct.LoggingConfig.html b/cu29_runtime/config/struct.LoggingConfig.html
index f7f1a5682..297b469b3 100644
--- a/cu29_runtime/config/struct.LoggingConfig.html
+++ b/cu29_runtime/config/struct.LoggingConfig.html
@@ -1,4 +1,4 @@
-LoggingConfig in cu29_runtime::config - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
+LoggingConfig in cu29_runtime::config - Rust

Struct LoggingConfig

Source
pub struct LoggingConfig {
     pub slab_size_mib: Option<u64>,
     pub section_size_mib: Option<u64>,
     pub enable_task_logging: bool,
diff --git a/cu29_runtime/config/struct.MonitorConfig.html b/cu29_runtime/config/struct.MonitorConfig.html
index 30753c4a4..f20e947ed 100644
--- a/cu29_runtime/config/struct.MonitorConfig.html
+++ b/cu29_runtime/config/struct.MonitorConfig.html
@@ -1,4 +1,4 @@
-MonitorConfig in cu29_runtime::config - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Clone for MonitorConfig

Source§

fn clone(&self) -> MonitorConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorConfig

Source§

fn default() -> MonitorConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where +MonitorConfig in cu29_runtime::config - Rust

Struct MonitorConfig

Source
pub struct MonitorConfig { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Clone for MonitorConfig

Source§

fn clone(&self) -> MonitorConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorConfig

Source§

fn default() -> MonitorConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for MonitorConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29_runtime/config/struct.Node.html b/cu29_runtime/config/struct.Node.html index 75e594419..598c77387 100644 --- a/cu29_runtime/config/struct.Node.html +++ b/cu29_runtime/config/struct.Node.html @@ -1,4 +1,4 @@ -Node in cu29_runtime::config - Rust

Struct Node

Source
pub struct Node { /* private fields */ }
Expand description

A node in the configuration graph. +Node in cu29_runtime::config - Rust

Struct Node

Source
pub struct Node { /* private fields */ }
Expand description

A node in the configuration graph. A node represents a Task in the system Graph.

Implementations§

Source§

impl Node

Source

pub fn new(id: &str, ptype: &str) -> Self

Source

pub fn get_id(&self) -> String

Source

pub fn set_type(self, name: Option<String>) -> Self

Source

pub fn get_type(&self) -> &str

Source

pub fn get_instance_config(&self) -> Option<&ComponentConfig>

Source

pub fn get_param<T: From<Value>>(&self, key: &str) -> Option<T>

Source

pub fn set_param<T: Into<Value>>(&mut self, key: &str, value: T)

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Node

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Node

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/cu29_runtime/config/struct.Value.html b/cu29_runtime/config/struct.Value.html index b4af05c9c..ed1cfaeeb 100644 --- a/cu29_runtime/config/struct.Value.html +++ b/cu29_runtime/config/struct.Value.html @@ -1,4 +1,4 @@ -Value in cu29_runtime::config - Rust

Struct Value

Source
pub struct Value(/* private fields */);
Expand description

Wrapper around the ron::Value to allow for custom serialization.

+Value in cu29_runtime::config - Rust

Struct Value

Source
pub struct Value(/* private fields */);
Expand description

Wrapper around the ron::Value to allow for custom serialization.

Trait Implementations§

Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Value

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<String> for Value

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for String

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for bool

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for f64

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for i32

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for u32

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for u8

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Value

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Value

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Value

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Value

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Value

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Value

Source§

fn eq(&self, other: &Value) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Value

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/cu29_runtime/config/type.NodeId.html b/cu29_runtime/config/type.NodeId.html index fd4ad4cfd..0208016c5 100644 --- a/cu29_runtime/config/type.NodeId.html +++ b/cu29_runtime/config/type.NodeId.html @@ -1,3 +1,3 @@ -NodeId in cu29_runtime::config - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph +NodeId in cu29_runtime::config - Rust

Type Alias NodeId

Source
pub type NodeId = u32;
Expand description

NodeId is the unique identifier of a node in the configuration graph for petgraph and the code generation.

\ No newline at end of file diff --git a/cu29_runtime/copperlist/enum.CopperListState.html b/cu29_runtime/copperlist/enum.CopperListState.html index 5c7d39a70..c39f1bd76 100644 --- a/cu29_runtime/copperlist/enum.CopperListState.html +++ b/cu29_runtime/copperlist/enum.CopperListState.html @@ -1,4 +1,4 @@ -CopperListState in cu29_runtime::copperlist - Rust

Enum CopperListState

Source
pub enum CopperListState {
+CopperListState in cu29_runtime::copperlist - Rust

Enum CopperListState

Source
pub enum CopperListState {
     Free,
     Initialized,
     Processing,
diff --git a/cu29_runtime/copperlist/index.html b/cu29_runtime/copperlist/index.html
index e766e775e..072e83201 100644
--- a/cu29_runtime/copperlist/index.html
+++ b/cu29_runtime/copperlist/index.html
@@ -1,4 +1,4 @@
-cu29_runtime::copperlist - Rust

Module copperlist

Source
Expand description

CopperList is the main data structure used by Copper to communicate between tasks. +cu29_runtime::copperlist - Rust

Module copperlist

Source
Expand description

CopperList is the main data structure used by Copper to communicate between tasks. It is a queue that can be used to store preallocated messages between tasks in memory order.

Structs§

CopperLiskMask
Not implemented yet. This mask will be used to for example filter out necessary regions of a copper list between remote systems.
CopperList
CuListsManager
This structure maintains the entire memory needed by Copper for one loop for the inter tasks communication within a process. diff --git a/cu29_runtime/copperlist/struct.CopperLiskMask.html b/cu29_runtime/copperlist/struct.CopperLiskMask.html index 1b242a733..98699532c 100644 --- a/cu29_runtime/copperlist/struct.CopperLiskMask.html +++ b/cu29_runtime/copperlist/struct.CopperLiskMask.html @@ -1,4 +1,4 @@ -CopperLiskMask in cu29_runtime::copperlist - Rust

Struct CopperLiskMask

Source
pub struct CopperLiskMask { /* private fields */ }
Expand description

Not implemented yet. +CopperLiskMask in cu29_runtime::copperlist - Rust

Struct CopperLiskMask

Source
pub struct CopperLiskMask { /* private fields */ }
Expand description

Not implemented yet. This mask will be used to for example filter out necessary regions of a copper list between remote systems.

Trait Implementations§

Source§

impl<'__de> BorrowDecode<'__de> for CopperLiskMask

Source§

fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D, diff --git a/cu29_runtime/copperlist/struct.CopperList.html b/cu29_runtime/copperlist/struct.CopperList.html index afea41341..676ce0918 100644 --- a/cu29_runtime/copperlist/struct.CopperList.html +++ b/cu29_runtime/copperlist/struct.CopperList.html @@ -1,4 +1,4 @@ -CopperList in cu29_runtime::copperlist - Rust

Struct CopperList

Source
pub struct CopperList<P: CopperListTuple> {
+CopperList in cu29_runtime::copperlist - Rust

Struct CopperList

Source
pub struct CopperList<P: CopperListTuple> {
     pub id: u32,
     pub msgs: P,
     /* private fields */
diff --git a/cu29_runtime/copperlist/struct.CuListsManager.html b/cu29_runtime/copperlist/struct.CuListsManager.html
index 56598d841..1f2415cc1 100644
--- a/cu29_runtime/copperlist/struct.CuListsManager.html
+++ b/cu29_runtime/copperlist/struct.CuListsManager.html
@@ -1,4 +1,4 @@
-CuListsManager in cu29_runtime::copperlist - Rust

Struct CuListsManager

Source
pub struct CuListsManager<P: CopperListTuple, const N: usize> { /* private fields */ }
Expand description

This structure maintains the entire memory needed by Copper for one loop for the inter tasks communication within a process. +CuListsManager in cu29_runtime::copperlist - Rust

Struct CuListsManager

Source
pub struct CuListsManager<P: CopperListTuple, const N: usize> { /* private fields */ }
Expand description

This structure maintains the entire memory needed by Copper for one loop for the inter tasks communication within a process. P or Payload is typically a Tuple of various types of messages that are exchanged between tasks. N is the maximum number of in flight Copper List the runtime can support.

Implementations§

Source§

impl<P: CopperListTuple, const N: usize> CuListsManager<P, N>

Source

pub fn new() -> Self

Source

pub fn len(&self) -> usize

Returns the current number of elements in the queue.

diff --git a/cu29_runtime/copperlist/type.AscIter.html b/cu29_runtime/copperlist/type.AscIter.html index 206fb7ad8..0f6bcd7d4 100644 --- a/cu29_runtime/copperlist/type.AscIter.html +++ b/cu29_runtime/copperlist/type.AscIter.html @@ -1 +1 @@ -AscIter in cu29_runtime::copperlist - Rust

Type Alias AscIter

Source
pub type AscIter<'a, T> = Chain<Iter<'a, T>, Iter<'a, T>>;

Aliased Type§

struct AscIter<'a, T> { /* private fields */ }
\ No newline at end of file +AscIter in cu29_runtime::copperlist - Rust

Type Alias AscIter

Source
pub type AscIter<'a, T> = Chain<Iter<'a, T>, Iter<'a, T>>;

Aliased Type§

struct AscIter<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29_runtime/copperlist/type.AscIterMut.html b/cu29_runtime/copperlist/type.AscIterMut.html index b8299dce7..66cdb5f0f 100644 --- a/cu29_runtime/copperlist/type.AscIterMut.html +++ b/cu29_runtime/copperlist/type.AscIterMut.html @@ -1 +1 @@ -AscIterMut in cu29_runtime::copperlist - Rust

Type Alias AscIterMut

Source
pub type AscIterMut<'a, T> = Chain<IterMut<'a, T>, IterMut<'a, T>>;

Aliased Type§

struct AscIterMut<'a, T> { /* private fields */ }
\ No newline at end of file +AscIterMut in cu29_runtime::copperlist - Rust

Type Alias AscIterMut

Source
pub type AscIterMut<'a, T> = Chain<IterMut<'a, T>, IterMut<'a, T>>;

Aliased Type§

struct AscIterMut<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29_runtime/copperlist/type.Iter.html b/cu29_runtime/copperlist/type.Iter.html index 57daf3415..6f8365a54 100644 --- a/cu29_runtime/copperlist/type.Iter.html +++ b/cu29_runtime/copperlist/type.Iter.html @@ -1 +1 @@ -Iter in cu29_runtime::copperlist - Rust

Type Alias Iter

Source
pub type Iter<'a, T> = Chain<Rev<Iter<'a, T>>, Rev<Iter<'a, T>>>;

Aliased Type§

struct Iter<'a, T> { /* private fields */ }
\ No newline at end of file +Iter in cu29_runtime::copperlist - Rust

Type Alias Iter

Source
pub type Iter<'a, T> = Chain<Rev<Iter<'a, T>>, Rev<Iter<'a, T>>>;

Aliased Type§

struct Iter<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29_runtime/copperlist/type.IterMut.html b/cu29_runtime/copperlist/type.IterMut.html index e522e31a3..30fb5b15e 100644 --- a/cu29_runtime/copperlist/type.IterMut.html +++ b/cu29_runtime/copperlist/type.IterMut.html @@ -1 +1 @@ -IterMut in cu29_runtime::copperlist - Rust

Type Alias IterMut

Source
pub type IterMut<'a, T> = Chain<Rev<IterMut<'a, T>>, Rev<IterMut<'a, T>>>;

Aliased Type§

struct IterMut<'a, T> { /* private fields */ }
\ No newline at end of file +IterMut in cu29_runtime::copperlist - Rust

Type Alias IterMut

Source
pub type IterMut<'a, T> = Chain<Rev<IterMut<'a, T>>, Rev<IterMut<'a, T>>>;

Aliased Type§

struct IterMut<'a, T> { /* private fields */ }
\ No newline at end of file diff --git a/cu29_runtime/curuntime/enum.CuExecutionUnit.html b/cu29_runtime/curuntime/enum.CuExecutionUnit.html index d715421fc..bd8262fd8 100644 --- a/cu29_runtime/curuntime/enum.CuExecutionUnit.html +++ b/cu29_runtime/curuntime/enum.CuExecutionUnit.html @@ -1,4 +1,4 @@ -CuExecutionUnit in cu29_runtime::curuntime - Rust

Enum CuExecutionUnit

Source
pub enum CuExecutionUnit {
+CuExecutionUnit in cu29_runtime::curuntime - Rust

Enum CuExecutionUnit

Source
pub enum CuExecutionUnit {
     Step(CuExecutionStep),
     Loop(CuExecutionLoop),
 }
Expand description

This structure represents a step in the execution plan.

diff --git a/cu29_runtime/curuntime/enum.CuTaskType.html b/cu29_runtime/curuntime/enum.CuTaskType.html index 8914d8683..8fdefd8aa 100644 --- a/cu29_runtime/curuntime/enum.CuTaskType.html +++ b/cu29_runtime/curuntime/enum.CuTaskType.html @@ -1,4 +1,4 @@ -CuTaskType in cu29_runtime::curuntime - Rust

Enum CuTaskType

Source
pub enum CuTaskType {
+CuTaskType in cu29_runtime::curuntime - Rust

Enum CuTaskType

Source
pub enum CuTaskType {
     Source,
     Regular,
     Sink,
diff --git a/cu29_runtime/curuntime/fn.compute_runtime_plan.html b/cu29_runtime/curuntime/fn.compute_runtime_plan.html
index db6f79ccd..19093fce6 100644
--- a/cu29_runtime/curuntime/fn.compute_runtime_plan.html
+++ b/cu29_runtime/curuntime/fn.compute_runtime_plan.html
@@ -1,3 +1,3 @@
-compute_runtime_plan in cu29_runtime::curuntime - Rust

Function compute_runtime_plan

Source
pub fn compute_runtime_plan(config: &CuConfig) -> CuResult<CuExecutionLoop>
Expand description

This is the main heuristics to compute an execution plan at compilation time. +compute_runtime_plan in cu29_runtime::curuntime - Rust

Function compute_runtime_plan

Source
pub fn compute_runtime_plan(config: &CuConfig) -> CuResult<CuExecutionLoop>
Expand description

This is the main heuristics to compute an execution plan at compilation time. TODO: Make that heuristic pluggable.

\ No newline at end of file diff --git a/cu29_runtime/curuntime/fn.find_task_type_for_id.html b/cu29_runtime/curuntime/fn.find_task_type_for_id.html index 340807c93..5dac65c32 100644 --- a/cu29_runtime/curuntime/fn.find_task_type_for_id.html +++ b/cu29_runtime/curuntime/fn.find_task_type_for_id.html @@ -1,4 +1,4 @@ -find_task_type_for_id in cu29_runtime::curuntime - Rust

Function find_task_type_for_id

Source
pub fn find_task_type_for_id(
+find_task_type_for_id in cu29_runtime::curuntime - Rust

Function find_task_type_for_id

Source
pub fn find_task_type_for_id(
     graph: &StableDiGraph<Node, Cnx, NodeId>,
     node_id: NodeId,
 ) -> CuTaskType
\ No newline at end of file diff --git a/cu29_runtime/curuntime/index.html b/cu29_runtime/curuntime/index.html index 78d817f65..e3a96b961 100644 --- a/cu29_runtime/curuntime/index.html +++ b/cu29_runtime/curuntime/index.html @@ -1,4 +1,4 @@ -cu29_runtime::curuntime - Rust

Module curuntime

Source
Expand description

CuRuntime is the heart of what copper is running on the robot. +cu29_runtime::curuntime - Rust

Module curuntime

Source
Expand description

CuRuntime is the heart of what copper is running on the robot. It is exposed to the user via the copper_runtime macro injecting it as a field in their application struct.

Structs§

CopperContext
Just a simple struct to hold the various bits needed to run a Copper application.
CuExecutionLoop
This structure represents a loop in the execution plan. It is used to represent a sequence of Execution units (loop or steps) that are executed diff --git a/cu29_runtime/curuntime/struct.CopperContext.html b/cu29_runtime/curuntime/struct.CopperContext.html index 89d60ce79..1ccbbb65c 100644 --- a/cu29_runtime/curuntime/struct.CopperContext.html +++ b/cu29_runtime/curuntime/struct.CopperContext.html @@ -1,4 +1,4 @@ -CopperContext in cu29_runtime::curuntime - Rust

Struct CopperContext

Source
pub struct CopperContext {
+CopperContext in cu29_runtime::curuntime - Rust

Struct CopperContext

Source
pub struct CopperContext {
     pub unified_logger: Arc<Mutex<UnifiedLoggerWrite>>,
     pub logger_runtime: LoggerRuntime,
     pub clock: RobotClock,
diff --git a/cu29_runtime/curuntime/struct.CuExecutionLoop.html b/cu29_runtime/curuntime/struct.CuExecutionLoop.html
index 68529670e..156ac5de2 100644
--- a/cu29_runtime/curuntime/struct.CuExecutionLoop.html
+++ b/cu29_runtime/curuntime/struct.CuExecutionLoop.html
@@ -1,4 +1,4 @@
-CuExecutionLoop in cu29_runtime::curuntime - Rust

Struct CuExecutionLoop

Source
pub struct CuExecutionLoop {
+CuExecutionLoop in cu29_runtime::curuntime - Rust

Struct CuExecutionLoop

Source
pub struct CuExecutionLoop {
     pub steps: Vec<CuExecutionUnit>,
     pub loop_count: Option<u32>,
 }
Expand description

This structure represents a loop in the execution plan. diff --git a/cu29_runtime/curuntime/struct.CuExecutionStep.html b/cu29_runtime/curuntime/struct.CuExecutionStep.html index 0c8e7eca7..a5b8c2d5b 100644 --- a/cu29_runtime/curuntime/struct.CuExecutionStep.html +++ b/cu29_runtime/curuntime/struct.CuExecutionStep.html @@ -1,4 +1,4 @@ -CuExecutionStep in cu29_runtime::curuntime - Rust

Struct CuExecutionStep

Source
pub struct CuExecutionStep {
+CuExecutionStep in cu29_runtime::curuntime - Rust

Struct CuExecutionStep

Source
pub struct CuExecutionStep {
     pub node_id: NodeId,
     pub node: Node,
     pub task_type: CuTaskType,
diff --git a/cu29_runtime/curuntime/struct.CuRuntime.html b/cu29_runtime/curuntime/struct.CuRuntime.html
index 4b084b72e..5b597eda8 100644
--- a/cu29_runtime/curuntime/struct.CuRuntime.html
+++ b/cu29_runtime/curuntime/struct.CuRuntime.html
@@ -1,4 +1,4 @@
-CuRuntime in cu29_runtime::curuntime - Rust

Struct CuRuntime

Source
pub struct CuRuntime<CT, P: CopperListTuple, M: CuMonitor, const NBCL: usize> {
+CuRuntime in cu29_runtime::curuntime - Rust

Struct CuRuntime

Source
pub struct CuRuntime<CT, P: CopperListTuple, M: CuMonitor, const NBCL: usize> {
     pub tasks: CT,
     pub monitor: M,
     pub copper_lists_manager: CuListsManager<P, NBCL>,
diff --git a/cu29_runtime/cutask/index.html b/cu29_runtime/cutask/index.html
index 7c69ce960..40c7c9fac 100644
--- a/cu29_runtime/cutask/index.html
+++ b/cu29_runtime/cutask/index.html
@@ -1,4 +1,4 @@
-cu29_runtime::cutask - Rust

Module cutask

Source
Expand description

This module contains all the main definition of the traits you need to implement +cu29_runtime::cutask - Rust

Module cutask

Source
Expand description

This module contains all the main definition of the traits you need to implement or interact with to create a Copper task.

Structs§

CuCompactString
CuMsg
CuMsg is the envelope holding the msg payload and the metadata between tasks.
CuMsgMetadata
CuMsgMetadata is a structure that contains metadata common to all CuMsgs.

Traits§

CuMsgPack
CuMsgPayload
CuSinkTask
A Sink Task is a task that only consumes messages. For example drivers for actuators are Sink Tasks.
CuSrcTask
A Src Task is a task that only produces messages. For example drivers for sensors are Src Tasks. They are in push mode from the runtime. diff --git a/cu29_runtime/cutask/struct.CuCompactString.html b/cu29_runtime/cutask/struct.CuCompactString.html index 10b4236df..f8048ad3b 100644 --- a/cu29_runtime/cutask/struct.CuCompactString.html +++ b/cu29_runtime/cutask/struct.CuCompactString.html @@ -1,4 +1,4 @@ -CuCompactString in cu29_runtime::cutask - Rust

Struct CuCompactString

Source
pub struct CuCompactString(pub CompactString);

Tuple Fields§

§0: CompactString

Trait Implementations§

Source§

impl<'de> BorrowDecode<'de> for CuCompactString

Source§

fn borrow_decode<D: BorrowDecoder<'de>>( +CuCompactString in cu29_runtime::cutask - Rust

Struct CuCompactString

Source
pub struct CuCompactString(pub CompactString);

Tuple Fields§

§0: CompactString

Trait Implementations§

Source§

impl<'de> BorrowDecode<'de> for CuCompactString

Source§

fn borrow_decode<D: BorrowDecoder<'de>>( decoder: &mut D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given BorrowDecode.
Source§

impl Clone for CuCompactString

Source§

fn clone(&self) -> CuCompactString

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CuCompactString

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Decode for CuCompactString

Source§

fn decode<D: Decoder>(decoder: &mut D) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
Source§

impl Default for CuCompactString

Source§

fn default() -> CuCompactString

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CuCompactString

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Encode for CuCompactString

Source§

fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), EncodeError>

Encode a given type.
Source§

impl PartialEq for CuCompactString

Source§

fn eq(&self, other: &CuCompactString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, diff --git a/cu29_runtime/cutask/struct.CuMsg.html b/cu29_runtime/cutask/struct.CuMsg.html index 18381e25b..9392b8de7 100644 --- a/cu29_runtime/cutask/struct.CuMsg.html +++ b/cu29_runtime/cutask/struct.CuMsg.html @@ -1,4 +1,4 @@ -CuMsg in cu29_runtime::cutask - Rust

Struct CuMsg

Source
pub struct CuMsg<T>
where +CuMsg in cu29_runtime::cutask - Rust

Struct CuMsg

Source
pub struct CuMsg<T>
where T: CuMsgPayload,
{ pub metadata: CuMsgMetadata, /* private fields */ diff --git a/cu29_runtime/cutask/struct.CuMsgMetadata.html b/cu29_runtime/cutask/struct.CuMsgMetadata.html index 3f00e44b9..79cc49c66 100644 --- a/cu29_runtime/cutask/struct.CuMsgMetadata.html +++ b/cu29_runtime/cutask/struct.CuMsgMetadata.html @@ -1,4 +1,4 @@ -CuMsgMetadata in cu29_runtime::cutask - Rust

Struct CuMsgMetadata

Source
pub struct CuMsgMetadata {
+CuMsgMetadata in cu29_runtime::cutask - Rust

Struct CuMsgMetadata

Source
pub struct CuMsgMetadata {
     pub process_time: PartialCuTimeRange,
     pub tov: Tov,
     pub status_txt: CuCompactString,
diff --git a/cu29_runtime/cutask/trait.CuMsgPack.html b/cu29_runtime/cutask/trait.CuMsgPack.html
index b268cfca1..3f0c13869 100644
--- a/cu29_runtime/cutask/trait.CuMsgPack.html
+++ b/cu29_runtime/cutask/trait.CuMsgPack.html
@@ -1 +1 @@
-CuMsgPack in cu29_runtime::cutask - Rust

Trait CuMsgPack

Source
pub trait CuMsgPack<'cl> { }

Implementations on Foreign Types§

Source§

impl CuMsgPack<'_> for ()

Source§

impl<'cl, T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>)

Source§

impl<'cl, T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl, T3: CuMsgPayload + 'cl> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>, &'cl CuMsg<T3>)

Source§

impl<'cl, T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl, T3: CuMsgPayload + 'cl, T4: CuMsgPayload + 'cl> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>, &'cl CuMsg<T3>, &'cl CuMsg<T4>)

Source§

impl<'cl, T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl, T3: CuMsgPayload + 'cl, T4: CuMsgPayload + 'cl, T5: CuMsgPayload + 'cl> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>, &'cl CuMsg<T3>, &'cl CuMsg<T4>, &'cl CuMsg<T5>)

Source§

impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for (&'cl CuMsg<T>,)

Source§

impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for (&'cl mut CuMsg<T>,)

Implementors§

Source§

impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for &'cl CuMsg<T>

Source§

impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for &'cl mut CuMsg<T>

\ No newline at end of file +CuMsgPack in cu29_runtime::cutask - Rust

Trait CuMsgPack

Source
pub trait CuMsgPack<'cl> { }

Implementations on Foreign Types§

Source§

impl CuMsgPack<'_> for ()

Source§

impl<'cl, T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>)

Source§

impl<'cl, T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl, T3: CuMsgPayload + 'cl> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>, &'cl CuMsg<T3>)

Source§

impl<'cl, T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl, T3: CuMsgPayload + 'cl, T4: CuMsgPayload + 'cl> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>, &'cl CuMsg<T3>, &'cl CuMsg<T4>)

Source§

impl<'cl, T1: CuMsgPayload + 'cl, T2: CuMsgPayload + 'cl, T3: CuMsgPayload + 'cl, T4: CuMsgPayload + 'cl, T5: CuMsgPayload + 'cl> CuMsgPack<'cl> for (&'cl CuMsg<T1>, &'cl CuMsg<T2>, &'cl CuMsg<T3>, &'cl CuMsg<T4>, &'cl CuMsg<T5>)

Source§

impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for (&'cl CuMsg<T>,)

Source§

impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for (&'cl mut CuMsg<T>,)

Implementors§

Source§

impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for &'cl CuMsg<T>

Source§

impl<'cl, T: CuMsgPayload> CuMsgPack<'cl> for &'cl mut CuMsg<T>

\ No newline at end of file diff --git a/cu29_runtime/cutask/trait.CuMsgPayload.html b/cu29_runtime/cutask/trait.CuMsgPayload.html index 4f47f103d..25cc2c576 100644 --- a/cu29_runtime/cutask/trait.CuMsgPayload.html +++ b/cu29_runtime/cutask/trait.CuMsgPayload.html @@ -1,4 +1,4 @@ -CuMsgPayload in cu29_runtime::cutask - Rust

Trait CuMsgPayload

Source
pub trait CuMsgPayload:
+CuMsgPayload in cu29_runtime::cutask - Rust

Trait CuMsgPayload

Source
pub trait CuMsgPayload:
     Default
     + Debug
     + Clone
diff --git a/cu29_runtime/cutask/trait.CuSinkTask.html b/cu29_runtime/cutask/trait.CuSinkTask.html
index de3d915e7..c9aa00487 100644
--- a/cu29_runtime/cutask/trait.CuSinkTask.html
+++ b/cu29_runtime/cutask/trait.CuSinkTask.html
@@ -1,4 +1,4 @@
-CuSinkTask in cu29_runtime::cutask - Rust

Trait CuSinkTask

Source
pub trait CuSinkTask<'cl>: Freezable {
+CuSinkTask in cu29_runtime::cutask - Rust

Trait CuSinkTask

Source
pub trait CuSinkTask<'cl>: Freezable {
     type Input: CuMsgPack<'cl>;
 
     // Required methods
diff --git a/cu29_runtime/cutask/trait.CuSrcTask.html b/cu29_runtime/cutask/trait.CuSrcTask.html
index 433f010de..751f28984 100644
--- a/cu29_runtime/cutask/trait.CuSrcTask.html
+++ b/cu29_runtime/cutask/trait.CuSrcTask.html
@@ -1,4 +1,4 @@
-CuSrcTask in cu29_runtime::cutask - Rust

Trait CuSrcTask

Source
pub trait CuSrcTask<'cl>: Freezable {
+CuSrcTask in cu29_runtime::cutask - Rust

Trait CuSrcTask

Source
pub trait CuSrcTask<'cl>: Freezable {
     type Output: CuMsgPack<'cl>;
 
     // Required methods
diff --git a/cu29_runtime/cutask/trait.CuTask.html b/cu29_runtime/cutask/trait.CuTask.html
index 752490867..6103de9a4 100644
--- a/cu29_runtime/cutask/trait.CuTask.html
+++ b/cu29_runtime/cutask/trait.CuTask.html
@@ -1,4 +1,4 @@
-CuTask in cu29_runtime::cutask - Rust

Trait CuTask

Source
pub trait CuTask<'cl>: Freezable {
+CuTask in cu29_runtime::cutask - Rust

Trait CuTask

Source
pub trait CuTask<'cl>: Freezable {
     type Input: CuMsgPack<'cl>;
     type Output: CuMsgPack<'cl>;
 
diff --git a/cu29_runtime/cutask/trait.Freezable.html b/cu29_runtime/cutask/trait.Freezable.html
index 6ea6e13f3..5b93f4c29 100644
--- a/cu29_runtime/cutask/trait.Freezable.html
+++ b/cu29_runtime/cutask/trait.Freezable.html
@@ -1,4 +1,4 @@
-Freezable in cu29_runtime::cutask - Rust

Trait Freezable

Source
pub trait Freezable {
+Freezable in cu29_runtime::cutask - Rust

Trait Freezable

Source
pub trait Freezable {
     // Provided methods
     fn freeze<E: Encoder>(&self, encoder: &mut E) -> Result<(), EncodeError> { ... }
     fn thaw<D: Decoder>(&mut self, decoder: &mut D) -> Result<(), DecodeError> { ... }
diff --git a/cu29_runtime/index.html b/cu29_runtime/index.html
index 3dca3afa3..0b5126a34 100644
--- a/cu29_runtime/index.html
+++ b/cu29_runtime/index.html
@@ -1,4 +1,4 @@
-cu29_runtime - Rust

Crate cu29_runtime

Source
Expand description
logo +cu29_runtime - Rust

Crate cu29_runtime

Source
Expand description
logo

§

§Copper

copper GitHub last commit diff --git a/cu29_runtime/macro.input_msg.html b/cu29_runtime/macro.input_msg.html index 0435948f2..bd5cb5db1 100644 --- a/cu29_runtime/macro.input_msg.html +++ b/cu29_runtime/macro.input_msg.html @@ -1,4 +1,4 @@ -input_msg in cu29_runtime - Rust

Macro input_msg

Source
macro_rules! input_msg {
+input_msg in cu29_runtime - Rust

Macro input_msg

Source
macro_rules! input_msg {
     ($lifetime:lifetime, $ty:ty) => { ... };
     ($lifetime:lifetime, $($ty:ty),*) => { ... };
 }
\ No newline at end of file diff --git a/cu29_runtime/macro.output_msg.html b/cu29_runtime/macro.output_msg.html index 07302fc08..549f94b59 100644 --- a/cu29_runtime/macro.output_msg.html +++ b/cu29_runtime/macro.output_msg.html @@ -1,3 +1,3 @@ -output_msg in cu29_runtime - Rust

Macro output_msg

Source
macro_rules! output_msg {
+output_msg in cu29_runtime - Rust

Macro output_msg

Source
macro_rules! output_msg {
     ($lifetime:lifetime, $ty:ty) => { ... };
 }
\ No newline at end of file diff --git a/cu29_runtime/monitoring/enum.CuTaskState.html b/cu29_runtime/monitoring/enum.CuTaskState.html index 9e2d5bd37..1e705c76d 100644 --- a/cu29_runtime/monitoring/enum.CuTaskState.html +++ b/cu29_runtime/monitoring/enum.CuTaskState.html @@ -1,4 +1,4 @@ -CuTaskState in cu29_runtime::monitoring - Rust

Enum CuTaskState

Source
pub enum CuTaskState {
+CuTaskState in cu29_runtime::monitoring - Rust

Enum CuTaskState

Source
pub enum CuTaskState {
     Start,
     Preprocess,
     Process,
diff --git a/cu29_runtime/monitoring/enum.Decision.html b/cu29_runtime/monitoring/enum.Decision.html
index b5db58f2a..18ee50564 100644
--- a/cu29_runtime/monitoring/enum.Decision.html
+++ b/cu29_runtime/monitoring/enum.Decision.html
@@ -1,4 +1,4 @@
-Decision in cu29_runtime::monitoring - Rust

Enum Decision

Source
pub enum Decision {
+Decision in cu29_runtime::monitoring - Rust

Enum Decision

Source
pub enum Decision {
     Abort,
     Ignore,
     Shutdown,
diff --git a/cu29_runtime/monitoring/index.html b/cu29_runtime/monitoring/index.html
index affd673e3..c8573b667 100644
--- a/cu29_runtime/monitoring/index.html
+++ b/cu29_runtime/monitoring/index.html
@@ -1,4 +1,4 @@
-cu29_runtime::monitoring - Rust

Module monitoring

Source
Expand description

Some basic internal monitoring tooling Copper uses to monitor itself and the tasks it is running.

+cu29_runtime::monitoring - Rust

Module monitoring

Source
Expand description

Some basic internal monitoring tooling Copper uses to monitor itself and the tasks it is running.

Structs§

CountingAllocator
A simple allocator that counts the number of bytes allocated and deallocated.
CuDurationStatistics
A Specialized statistics object for CuDuration. It will also keep track of the jitter between the values.
LiveStatistics
Accumulative stat object that can give your some real time statistics.
NoMonitor
A do nothing monitor if no monitor is provided. This is basically defining the default behavior of Copper in case of error.
ScopedAllocCounter
A simple struct that counts the number of bytes allocated and deallocated in a scope.

Enums§

CuTaskState
The state of a task.
Decision
Monitor decision to be taken when a task errored out.

Statics§

GLOBAL

Traits§

CuMonitor
Trait to implement a monitoring task.
\ No newline at end of file diff --git a/cu29_runtime/monitoring/static.GLOBAL.html b/cu29_runtime/monitoring/static.GLOBAL.html index c22bd2601..c1d133a56 100644 --- a/cu29_runtime/monitoring/static.GLOBAL.html +++ b/cu29_runtime/monitoring/static.GLOBAL.html @@ -1 +1 @@ -GLOBAL in cu29_runtime::monitoring - Rust

Static GLOBAL

Source
pub static GLOBAL: CountingAllocator
\ No newline at end of file +GLOBAL in cu29_runtime::monitoring - Rust

Static GLOBAL

Source
pub static GLOBAL: CountingAllocator
\ No newline at end of file diff --git a/cu29_runtime/monitoring/struct.CountingAllocator.html b/cu29_runtime/monitoring/struct.CountingAllocator.html index f4f58883a..b046f4e2d 100644 --- a/cu29_runtime/monitoring/struct.CountingAllocator.html +++ b/cu29_runtime/monitoring/struct.CountingAllocator.html @@ -1,4 +1,4 @@ -CountingAllocator in cu29_runtime::monitoring - Rust

Struct CountingAllocator

Source
pub struct CountingAllocator { /* private fields */ }
Expand description

A simple allocator that counts the number of bytes allocated and deallocated.

+CountingAllocator in cu29_runtime::monitoring - Rust

Struct CountingAllocator

Source
pub struct CountingAllocator { /* private fields */ }
Expand description

A simple allocator that counts the number of bytes allocated and deallocated.

Implementations§

Source§

impl CountingAllocator

Source

pub const fn new() -> Self

Source

pub fn get_allocated(&self) -> usize

Source

pub fn get_deallocated(&self) -> usize

Source

pub fn reset(&self)

Trait Implementations§

Source§

impl Default for CountingAllocator

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl GlobalAlloc for CountingAllocator

Source§

unsafe fn alloc(&self, layout: Layout) -> *mut u8

Allocates memory as described by the given layout. Read more
Source§

unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout)

Deallocates the block of memory at the given ptr pointer with the given layout. Read more
1.28.0 · Source§

unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8

Behaves like alloc, but also ensures that the contents are set to zero before being returned. Read more
1.28.0 · Source§

unsafe fn realloc( &self, diff --git a/cu29_runtime/monitoring/struct.CuDurationStatistics.html b/cu29_runtime/monitoring/struct.CuDurationStatistics.html index 3e439bbd0..59a295e7e 100644 --- a/cu29_runtime/monitoring/struct.CuDurationStatistics.html +++ b/cu29_runtime/monitoring/struct.CuDurationStatistics.html @@ -1,4 +1,4 @@ -CuDurationStatistics in cu29_runtime::monitoring - Rust

Struct CuDurationStatistics

Source
pub struct CuDurationStatistics { /* private fields */ }
Expand description

A Specialized statistics object for CuDuration. +CuDurationStatistics in cu29_runtime::monitoring - Rust

Struct CuDurationStatistics

Source
pub struct CuDurationStatistics { /* private fields */ }
Expand description

A Specialized statistics object for CuDuration. It will also keep track of the jitter between the values.

Implementations§

Source§

impl CuDurationStatistics

Source

pub fn new(max: CuDuration) -> Self

Source

pub fn min(&self) -> CuDuration

Source

pub fn max(&self) -> CuDuration

Source

pub fn mean(&self) -> CuDuration

Source

pub fn percentile(&self, percentile: f64) -> CuDuration

Source

pub fn stddev(&self) -> CuDuration

Source

pub fn len(&self) -> u64

Source

pub fn is_empty(&self) -> bool

Source

pub fn jitter_min(&self) -> CuDuration

Source

pub fn jitter_max(&self) -> CuDuration

Source

pub fn jitter_mean(&self) -> CuDuration

Source

pub fn jitter_stddev(&self) -> CuDuration

Source

pub fn jitter_percentile(&self, percentile: f64) -> CuDuration

Source

pub fn record(&mut self, value: CuDuration)

Source

pub fn reset(&mut self)

Trait Implementations§

Source§

impl Clone for CuDurationStatistics

Source§

fn clone(&self) -> CuDurationStatistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CuDurationStatistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29_runtime/monitoring/struct.LiveStatistics.html b/cu29_runtime/monitoring/struct.LiveStatistics.html index 289c4bfae..05aa9ef7e 100644 --- a/cu29_runtime/monitoring/struct.LiveStatistics.html +++ b/cu29_runtime/monitoring/struct.LiveStatistics.html @@ -1,4 +1,4 @@ -LiveStatistics in cu29_runtime::monitoring - Rust

Struct LiveStatistics

Source
pub struct LiveStatistics { /* private fields */ }
Expand description

Accumulative stat object that can give your some real time statistics.

+LiveStatistics in cu29_runtime::monitoring - Rust

Struct LiveStatistics

Source
pub struct LiveStatistics { /* private fields */ }
Expand description

Accumulative stat object that can give your some real time statistics.

Implementations§

Source§

impl LiveStatistics

Source

pub fn new_unbounded() -> Self

Source

pub fn new_with_max(max: u64) -> Self

Source

pub fn min(&self) -> u64

Source

pub fn max(&self) -> u64

Source

pub fn mean(&self) -> f64

Source

pub fn percentile(&self, percentile: f64) -> u64

Source

pub fn record(&mut self, value: u64)

Adds a value to the statistics.

Source

pub fn len(&self) -> u64

Source

pub fn is_empty(&self) -> bool

Source

pub fn reset(&mut self)

Trait Implementations§

Source§

impl Clone for LiveStatistics

Source§

fn clone(&self) -> LiveStatistics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LiveStatistics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29_runtime/monitoring/struct.NoMonitor.html b/cu29_runtime/monitoring/struct.NoMonitor.html index 4733ca213..7f909b314 100644 --- a/cu29_runtime/monitoring/struct.NoMonitor.html +++ b/cu29_runtime/monitoring/struct.NoMonitor.html @@ -1,4 +1,4 @@ -NoMonitor in cu29_runtime::monitoring - Rust

Struct NoMonitor

Source
pub struct NoMonitor {}
Expand description

A do nothing monitor if no monitor is provided. +NoMonitor in cu29_runtime::monitoring - Rust

Struct NoMonitor

Source
pub struct NoMonitor {}
Expand description

A do nothing monitor if no monitor is provided. This is basically defining the default behavior of Copper in case of error.

Trait Implementations§

Source§

impl CuMonitor for NoMonitor

Source§

fn new(_config: &CuConfig, _taskids: &'static [&'static str]) -> CuResult<Self>

Source§

fn process_copperlist(&self, _msgs: &[&CuMsgMetadata]) -> CuResult<()>

Callback that will be trigger at the end of every copperlist (before, on or after the serialization).
Source§

fn process_error( &self, diff --git a/cu29_runtime/monitoring/struct.ScopedAllocCounter.html b/cu29_runtime/monitoring/struct.ScopedAllocCounter.html index cf21582d9..46cb9a7de 100644 --- a/cu29_runtime/monitoring/struct.ScopedAllocCounter.html +++ b/cu29_runtime/monitoring/struct.ScopedAllocCounter.html @@ -1,4 +1,4 @@ -ScopedAllocCounter in cu29_runtime::monitoring - Rust

Struct ScopedAllocCounter

Source
pub struct ScopedAllocCounter { /* private fields */ }
Expand description

A simple struct that counts the number of bytes allocated and deallocated in a scope.

+ScopedAllocCounter in cu29_runtime::monitoring - Rust

Struct ScopedAllocCounter

Source
pub struct ScopedAllocCounter { /* private fields */ }
Expand description

A simple struct that counts the number of bytes allocated and deallocated in a scope.

Implementations§

Source§

impl ScopedAllocCounter

Source

pub fn new() -> Self

Source

pub fn get_allocated(&self) -> usize

Returns the total number of bytes allocated in the current scope since the creation of this ScopedAllocCounter.

§Example
diff --git a/cu29_runtime/monitoring/trait.CuMonitor.html b/cu29_runtime/monitoring/trait.CuMonitor.html index 59b73956b..6c1d140df 100644 --- a/cu29_runtime/monitoring/trait.CuMonitor.html +++ b/cu29_runtime/monitoring/trait.CuMonitor.html @@ -1,4 +1,4 @@ -CuMonitor in cu29_runtime::monitoring - Rust

Trait CuMonitor

Source
pub trait CuMonitor: Sized {
+CuMonitor in cu29_runtime::monitoring - Rust

Trait CuMonitor

Source
pub trait CuMonitor: Sized {
     // Required methods
     fn new(
         config: &CuConfig,
diff --git a/cu29_runtime/payload/index.html b/cu29_runtime/payload/index.html
index 67cd9664c..75237425a 100644
--- a/cu29_runtime/payload/index.html
+++ b/cu29_runtime/payload/index.html
@@ -1 +1 @@
-cu29_runtime::payload - Rust

Module payload

Source

Structs§

CuArray
Copper friendly wrapper for a fixed size array.
\ No newline at end of file +cu29_runtime::payload - Rust

Module payload

Source

Structs§

CuArray
Copper friendly wrapper for a fixed size array.
\ No newline at end of file diff --git a/cu29_runtime/payload/struct.CuArray.html b/cu29_runtime/payload/struct.CuArray.html index 1c15520f3..bd89ad6ff 100644 --- a/cu29_runtime/payload/struct.CuArray.html +++ b/cu29_runtime/payload/struct.CuArray.html @@ -1,4 +1,4 @@ -CuArray in cu29_runtime::payload - Rust

Struct CuArray

Source
pub struct CuArray<T, const N: usize> { /* private fields */ }
Expand description

Copper friendly wrapper for a fixed size array.

+CuArray in cu29_runtime::payload - Rust

Struct CuArray

Source
pub struct CuArray<T, const N: usize> { /* private fields */ }
Expand description

Copper friendly wrapper for a fixed size array.

Implementations§

Source§

impl<T, const N: usize> CuArray<T, N>

Source

pub fn new() -> Self

Source

pub fn fill_from_iter<I>(&mut self, iter: I)
where I: IntoIterator<Item = T>,

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn as_slice(&self) -> &[T]

Source

pub fn capacity(&self) -> usize

Trait Implementations§

Source§

impl<T: Clone, const N: usize> Clone for CuArray<T, N>

Source§

fn clone(&self) -> CuArray<T, N>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, const N: usize> Debug for CuArray<T, N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, const N: usize> Decode for CuArray<T, N>
where T: Decode,

Source§

fn decode<D: Decoder>(decoder: &mut D) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
Source§

impl<T: Default, const N: usize> Default for CuArray<T, N>

Source§

fn default() -> CuArray<T, N>

Returns the “default value” for a type. Read more
Source§

impl<T, const N: usize> Encode for CuArray<T, N>
where diff --git a/cu29_runtime/pool/enum.CuHandleInner.html b/cu29_runtime/pool/enum.CuHandleInner.html index 651e79951..87c6f637e 100644 --- a/cu29_runtime/pool/enum.CuHandleInner.html +++ b/cu29_runtime/pool/enum.CuHandleInner.html @@ -1,4 +1,4 @@ -CuHandleInner in cu29_runtime::pool - Rust

Enum CuHandleInner

Source
pub enum CuHandleInner<T: Debug> {
+CuHandleInner in cu29_runtime::pool - Rust

Enum CuHandleInner

Source
pub enum CuHandleInner<T: Debug> {
     Pooled(ReusableOwned<T>),
     Detached(T),
 }
Expand description

A Handle to a Buffer. diff --git a/cu29_runtime/pool/fn.pools_statistics.html b/cu29_runtime/pool/fn.pools_statistics.html index 1f8938b39..646fc8155 100644 --- a/cu29_runtime/pool/fn.pools_statistics.html +++ b/cu29_runtime/pool/fn.pools_statistics.html @@ -1,3 +1,3 @@ -pools_statistics in cu29_runtime::pool - Rust

Function pools_statistics

Source
pub fn pools_statistics() -> SmallVec<[(ArrayString<64>, usize, usize, usize); 16]>
Expand description

Get the list of pools and their statistics. +pools_statistics in cu29_runtime::pool - Rust

Function pools_statistics

Source
pub fn pools_statistics() -> SmallVec<[(ArrayString<64>, usize, usize, usize); 16]>
Expand description

Get the list of pools and their statistics. We use SmallVec here to avoid heap allocations while the stack is running.

\ No newline at end of file diff --git a/cu29_runtime/pool/index.html b/cu29_runtime/pool/index.html index 28cded5be..d816b0119 100644 --- a/cu29_runtime/pool/index.html +++ b/cu29_runtime/pool/index.html @@ -1,4 +1,4 @@ -cu29_runtime::pool - Rust

Module pool

Source

Structs§

AlignedBuffer
A buffer that is aligned to a specific size with the Element of type E.
CuHandle
A shareable handle to an Array coming from a pool (either host or device).
CuHostMemoryPool
A pool of host memory buffers.

Enums§

CuHandleInner
A Handle to a Buffer. +cu29_runtime::pool - Rust

Module pool

Source

Structs§

AlignedBuffer
A buffer that is aligned to a specific size with the Element of type E.
CuHandle
A shareable handle to an Array coming from a pool (either host or device).
CuHostMemoryPool
A pool of host memory buffers.

Enums§

CuHandleInner
A Handle to a Buffer. For onboard usages, the buffer should be Pooled (ie, coming from a preallocated pool). The Detached version is for offline usages where we don’t really need a pool to deserialize them.

Traits§

ArrayLike
CuPool
A CuPool is a pool of buffers that can be shared between different parts of the code. Handles can be stored locally in the tasks and shared between them.
DeviceCuPool
A device memory pool can copy data from a device to a host memory pool on top.
ElementType
Basic Type that can be used in a buffer in a CuPool.
PoolMonitor
Trait for a Pool to exposed to be monitored by the monitoring API.

Functions§

pools_statistics
Get the list of pools and their statistics. diff --git a/cu29_runtime/pool/struct.AlignedBuffer.html b/cu29_runtime/pool/struct.AlignedBuffer.html index 92e4dbc20..83a0451dd 100644 --- a/cu29_runtime/pool/struct.AlignedBuffer.html +++ b/cu29_runtime/pool/struct.AlignedBuffer.html @@ -1,4 +1,4 @@ -AlignedBuffer in cu29_runtime::pool - Rust

Struct AlignedBuffer

Source
pub struct AlignedBuffer<E: ElementType> { /* private fields */ }
Expand description

A buffer that is aligned to a specific size with the Element of type E.

+AlignedBuffer in cu29_runtime::pool - Rust

Struct AlignedBuffer

Source
pub struct AlignedBuffer<E: ElementType> { /* private fields */ }
Expand description

A buffer that is aligned to a specific size with the Element of type E.

Implementations§

Source§

impl<E: ElementType> AlignedBuffer<E>

Source

pub fn new(num_elements: usize, alignment: usize) -> Self

Methods from Deref<Target = [E]>§

Source

pub fn write_copy_of_slice(&mut self, src: &[T]) -> &mut [T]
where T: Copy,

🔬This is a nightly-only experimental API. (maybe_uninit_write_slice)

Copies the elements from src to self, returning a mutable reference to the now initialized contents of self.

diff --git a/cu29_runtime/pool/struct.CuHandle.html b/cu29_runtime/pool/struct.CuHandle.html index e3a11bab0..757fd4b07 100644 --- a/cu29_runtime/pool/struct.CuHandle.html +++ b/cu29_runtime/pool/struct.CuHandle.html @@ -1,4 +1,4 @@ -CuHandle in cu29_runtime::pool - Rust

Struct CuHandle

Source
pub struct CuHandle<T: ArrayLike>(/* private fields */);
Expand description

A shareable handle to an Array coming from a pool (either host or device).

+CuHandle in cu29_runtime::pool - Rust

Struct CuHandle

Source
pub struct CuHandle<T: ArrayLike>(/* private fields */);
Expand description

A shareable handle to an Array coming from a pool (either host or device).

Implementations§

Source§

impl<T: ArrayLike> CuHandle<T>

Source

pub fn new_detached(inner: T) -> Self

Create a new CuHandle not part of a Pool (not for onboard usages, use pools instead)

Source

pub fn with_inner<R>(&self, f: impl FnOnce(&CuHandleInner<T>) -> R) -> R

Safely access the inner value, applying a closure to it.

Source

pub fn with_inner_mut<R>(&self, f: impl FnOnce(&mut CuHandleInner<T>) -> R) -> R

Mutably access the inner value, applying a closure to it.

diff --git a/cu29_runtime/pool/struct.CuHostMemoryPool.html b/cu29_runtime/pool/struct.CuHostMemoryPool.html index 0a9a204f2..1b4b33569 100644 --- a/cu29_runtime/pool/struct.CuHostMemoryPool.html +++ b/cu29_runtime/pool/struct.CuHostMemoryPool.html @@ -1,4 +1,4 @@ -CuHostMemoryPool in cu29_runtime::pool - Rust

Struct CuHostMemoryPool

Source
pub struct CuHostMemoryPool<T> { /* private fields */ }
Expand description

A pool of host memory buffers.

+CuHostMemoryPool in cu29_runtime::pool - Rust

Struct CuHostMemoryPool

Source
pub struct CuHostMemoryPool<T> { /* private fields */ }
Expand description

A pool of host memory buffers.

Implementations§

Source§

impl<T: ArrayLike + 'static> CuHostMemoryPool<T>

Source

pub fn new<F>( id: &str, size: usize, diff --git a/cu29_runtime/pool/trait.ArrayLike.html b/cu29_runtime/pool/trait.ArrayLike.html index cb13a6703..6f4ffe539 100644 --- a/cu29_runtime/pool/trait.ArrayLike.html +++ b/cu29_runtime/pool/trait.ArrayLike.html @@ -1,4 +1,4 @@ -ArrayLike in cu29_runtime::pool - Rust

Trait ArrayLike

Source
pub trait ArrayLike:
+ArrayLike in cu29_runtime::pool - Rust

Trait ArrayLike

Source
pub trait ArrayLike:
     Deref<Target = [Self::Element]>
     + DerefMut
     + Debug
diff --git a/cu29_runtime/pool/trait.CuPool.html b/cu29_runtime/pool/trait.CuPool.html
index b12473a62..6c5043084 100644
--- a/cu29_runtime/pool/trait.CuPool.html
+++ b/cu29_runtime/pool/trait.CuPool.html
@@ -1,4 +1,4 @@
-CuPool in cu29_runtime::pool - Rust

Trait CuPool

Source
pub trait CuPool<T: ArrayLike>: PoolMonitor {
+CuPool in cu29_runtime::pool - Rust

Trait CuPool

Source
pub trait CuPool<T: ArrayLike>: PoolMonitor {
     // Required methods
     fn acquire(&self) -> Option<CuHandle<T>>;
     fn copy_from<O>(&self, from: &mut CuHandle<O>) -> CuHandle<T>
diff --git a/cu29_runtime/pool/trait.DeviceCuPool.html b/cu29_runtime/pool/trait.DeviceCuPool.html
index d2fc1a6dd..376bbfdd3 100644
--- a/cu29_runtime/pool/trait.DeviceCuPool.html
+++ b/cu29_runtime/pool/trait.DeviceCuPool.html
@@ -1,4 +1,4 @@
-DeviceCuPool in cu29_runtime::pool - Rust

Trait DeviceCuPool

Source
pub trait DeviceCuPool<T: ArrayLike>: CuPool<T> {
+DeviceCuPool in cu29_runtime::pool - Rust

Trait DeviceCuPool

Source
pub trait DeviceCuPool<T: ArrayLike>: CuPool<T> {
     // Required method
     fn copy_to_host_pool<O>(
         &self,
diff --git a/cu29_runtime/pool/trait.ElementType.html b/cu29_runtime/pool/trait.ElementType.html
index f6e83b9a8..2fcfad08a 100644
--- a/cu29_runtime/pool/trait.ElementType.html
+++ b/cu29_runtime/pool/trait.ElementType.html
@@ -1,4 +1,4 @@
-ElementType in cu29_runtime::pool - Rust

Trait ElementType

Source
pub trait ElementType:
+ElementType in cu29_runtime::pool - Rust

Trait ElementType

Source
pub trait ElementType:
     Default
     + Sized
     + Copy
diff --git a/cu29_runtime/pool/trait.PoolMonitor.html b/cu29_runtime/pool/trait.PoolMonitor.html
index 767dfa834..de48cbbd5 100644
--- a/cu29_runtime/pool/trait.PoolMonitor.html
+++ b/cu29_runtime/pool/trait.PoolMonitor.html
@@ -1,4 +1,4 @@
-PoolMonitor in cu29_runtime::pool - Rust

Trait PoolMonitor

Source
pub trait PoolMonitor: Send + Sync {
+PoolMonitor in cu29_runtime::pool - Rust

Trait PoolMonitor

Source
pub trait PoolMonitor: Send + Sync {
     // Required methods
     fn id(&self) -> ArrayString<64>;
     fn space_left(&self) -> usize;
diff --git a/cu29_runtime/simulation/enum.CuTaskCallbackState.html b/cu29_runtime/simulation/enum.CuTaskCallbackState.html
index e0a64070c..8e4d7dfd2 100644
--- a/cu29_runtime/simulation/enum.CuTaskCallbackState.html
+++ b/cu29_runtime/simulation/enum.CuTaskCallbackState.html
@@ -1,4 +1,4 @@
-CuTaskCallbackState in cu29_runtime::simulation - Rust

Enum CuTaskCallbackState

Source
pub enum CuTaskCallbackState<'cl, I, O>
where +CuTaskCallbackState in cu29_runtime::simulation - Rust

Enum CuTaskCallbackState

Source
pub enum CuTaskCallbackState<'cl, I, O>
where I: CuMsgPack<'cl>, O: CuMsgPack<'cl>,
{ New(Option<ComponentConfig>), diff --git a/cu29_runtime/simulation/enum.SimOverride.html b/cu29_runtime/simulation/enum.SimOverride.html index 9f8aa85f5..4ee3d2161 100644 --- a/cu29_runtime/simulation/enum.SimOverride.html +++ b/cu29_runtime/simulation/enum.SimOverride.html @@ -1,4 +1,4 @@ -SimOverride in cu29_runtime::simulation - Rust

Enum SimOverride

Source
pub enum SimOverride {
+SimOverride in cu29_runtime::simulation - Rust

Enum SimOverride

Source
pub enum SimOverride {
     ExecutedBySim,
     ExecuteByRuntime,
     Errored(String),
diff --git a/cu29_runtime/simulation/index.html b/cu29_runtime/simulation/index.html
index cf1815e53..fea697a81 100644
--- a/cu29_runtime/simulation/index.html
+++ b/cu29_runtime/simulation/index.html
@@ -1,4 +1,4 @@
-cu29_runtime::simulation - Rust

Module simulation

Source
Expand description

§cu29::simulation Module

+cu29_runtime::simulation - Rust

Module simulation

Source
Expand description

§cu29::simulation Module

The cu29::simulation module provides an interface to simulate tasks in Copper-based systems. It offers structures, traits, and enums that enable hooking into the lifecycle of tasks, adapting their behavior, and integrating them with simulated hardware environments.

diff --git a/cu29_runtime/simulation/struct.CuSimSinkTask.html b/cu29_runtime/simulation/struct.CuSimSinkTask.html index 11e55b48f..48f927303 100644 --- a/cu29_runtime/simulation/struct.CuSimSinkTask.html +++ b/cu29_runtime/simulation/struct.CuSimSinkTask.html @@ -1,4 +1,4 @@ -CuSimSinkTask in cu29_runtime::simulation - Rust

Struct CuSimSinkTask

Source
pub struct CuSimSinkTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a sink task for the simulations. +CuSimSinkTask in cu29_runtime::simulation - Rust

Struct CuSimSinkTask

Source
pub struct CuSimSinkTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a sink task for the simulations. It basically does nothing in place of a real driver so it won’t try to initialize any hardware.

Trait Implementations§

Source§

impl<'cl, T: CuMsgPayload + 'cl> CuSinkTask<'cl> for CuSimSinkTask<T>

Source§

type Input = &'cl CuMsg<T>

Source§

fn new(_config: Option<&ComponentConfig>) -> CuResult<Self>
where Self: Sized,

Here you need to initialize everything your task will need for the duration of its lifetime. diff --git a/cu29_runtime/simulation/struct.CuSimSrcTask.html b/cu29_runtime/simulation/struct.CuSimSrcTask.html index f555de134..888beeb96 100644 --- a/cu29_runtime/simulation/struct.CuSimSrcTask.html +++ b/cu29_runtime/simulation/struct.CuSimSrcTask.html @@ -1,4 +1,4 @@ -CuSimSrcTask in cu29_runtime::simulation - Rust

Struct CuSimSrcTask

Source
pub struct CuSimSrcTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a source task for the simulations. +CuSimSrcTask in cu29_runtime::simulation - Rust

Struct CuSimSrcTask

Source
pub struct CuSimSrcTask<T> { /* private fields */ }
Expand description

This is a placeholder task for a source task for the simulations. It basically does nothing in place of a real driver so it won’t try to initialize any hardware.

Trait Implementations§

Source§

impl<'cl, T: CuMsgPayload + 'cl> CuSrcTask<'cl> for CuSimSrcTask<T>

Source§

type Output = &'cl mut CuMsg<T>

Source§

fn new(_config: Option<&ComponentConfig>) -> CuResult<Self>
where Self: Sized,

Here you need to initialize everything your task will need for the duration of its lifetime. diff --git a/cu29_soa_derive/all.html b/cu29_soa_derive/all.html index f3c70414d..0936e6ed0 100644 --- a/cu29_soa_derive/all.html +++ b/cu29_soa_derive/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Derive Macros

\ No newline at end of file +List of all items in this crate

List of all items

Derive Macros

\ No newline at end of file diff --git a/cu29_soa_derive/derive.Soa.html b/cu29_soa_derive/derive.Soa.html index ead73170d..9a076f3d3 100644 --- a/cu29_soa_derive/derive.Soa.html +++ b/cu29_soa_derive/derive.Soa.html @@ -1,4 +1,4 @@ -Soa in cu29_soa_derive - Rust

Derive Macro Soa

Source
#[derive(Soa)]
Expand description

Build a fixed sized SoA (Structure of Arrays) from a struct. +Soa in cu29_soa_derive - Rust

Derive Macro Soa

Source
#[derive(Soa)]
Expand description

Build a fixed sized SoA (Structure of Arrays) from a struct. The outputted SoA will be suitable for in place storage in messages and should be easier for the compiler to vectorize.

for example:

diff --git a/cu29_soa_derive/index.html b/cu29_soa_derive/index.html index edb5d8919..5cf56a810 100644 --- a/cu29_soa_derive/index.html +++ b/cu29_soa_derive/index.html @@ -1,3 +1,3 @@ -cu29_soa_derive - Rust

Crate cu29_soa_derive

Source

Derive Macros§

Soa
Build a fixed sized SoA (Structure of Arrays) from a struct. +cu29_soa_derive - Rust

Crate cu29_soa_derive

Source

Derive Macros§

Soa
Build a fixed sized SoA (Structure of Arrays) from a struct. The outputted SoA will be suitable for in place storage in messages and should be easier for the compiler to vectorize.
\ No newline at end of file diff --git a/cu29_traits/all.html b/cu29_traits/all.html index e4330caa3..c9d56e2d3 100644 --- a/cu29_traits/all.html +++ b/cu29_traits/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Type Aliases

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Type Aliases

\ No newline at end of file diff --git a/cu29_traits/enum.UnifiedLogType.html b/cu29_traits/enum.UnifiedLogType.html index eb981f891..5a1b37e79 100644 --- a/cu29_traits/enum.UnifiedLogType.html +++ b/cu29_traits/enum.UnifiedLogType.html @@ -1,4 +1,4 @@ -UnifiedLogType in cu29_traits - Rust

Enum UnifiedLogType

Source
pub enum UnifiedLogType {
+UnifiedLogType in cu29_traits - Rust

Enum UnifiedLogType

Source
pub enum UnifiedLogType {
     Empty,
     StructuredLogLine,
     CopperList,
diff --git a/cu29_traits/index.html b/cu29_traits/index.html
index de2d76d21..ab77b502d 100644
--- a/cu29_traits/index.html
+++ b/cu29_traits/index.html
@@ -1 +1 @@
-cu29_traits - Rust

Crate cu29_traits

Source

Structs§

CuError
Common copper Error type.

Enums§

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

Traits§

CopperListTuple
A CopperListTuple needs to be encodable, decodable and fixed size in memory.
WriteStream
Defines a basic write, append only stream trait to be able to log or send serializable objects.

Type Aliases§

CuResult
\ No newline at end of file +cu29_traits - Rust

Crate cu29_traits

Source

Structs§

CuError
Common copper Error type.

Enums§

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

Traits§

CopperListTuple
A CopperListTuple needs to be encodable, decodable and fixed size in memory.
WriteStream
Defines a basic write, append only stream trait to be able to log or send serializable objects.

Type Aliases§

CuResult
\ No newline at end of file diff --git a/cu29_traits/struct.CuError.html b/cu29_traits/struct.CuError.html index e0a2579f7..f08ded368 100644 --- a/cu29_traits/struct.CuError.html +++ b/cu29_traits/struct.CuError.html @@ -1,4 +1,4 @@ -CuError in cu29_traits - Rust

Struct CuError

Source
pub struct CuError { /* private fields */ }
Expand description

Common copper Error type.

+CuError in cu29_traits - Rust

Struct CuError

Source
pub struct CuError { /* private fields */ }
Expand description

Common copper Error type.

Implementations§

Source§

impl CuError

Source

pub fn new_with_cause(message: &str, cause: impl Error) -> CuError

Source

pub fn add_cause(self, context: &str) -> CuError

Trait Implementations§

Source§

impl Clone for CuError

Source§

fn clone(&self) -> CuError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CuError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CuError

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for CuError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CuError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<&str> for CuError

Source§

fn from(s: &str) -> CuError

Converts to this type from the input type.
Source§

impl From<String> for CuError

Source§

fn from(s: String) -> CuError

Converts to this type from the input type.
Source§

impl Serialize for CuError

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where diff --git a/cu29_traits/trait.CopperListTuple.html b/cu29_traits/trait.CopperListTuple.html index 297de9f46..504a2ed23 100644 --- a/cu29_traits/trait.CopperListTuple.html +++ b/cu29_traits/trait.CopperListTuple.html @@ -1,4 +1,4 @@ -CopperListTuple in cu29_traits - Rust

Trait CopperListTuple

Source
pub trait CopperListTuple:
+CopperListTuple in cu29_traits - Rust

Trait CopperListTuple

Source
pub trait CopperListTuple:
     Encode
     + Decode
     + Sized
diff --git a/cu29_traits/trait.WriteStream.html b/cu29_traits/trait.WriteStream.html
index c975e77d4..bbdd2ccc2 100644
--- a/cu29_traits/trait.WriteStream.html
+++ b/cu29_traits/trait.WriteStream.html
@@ -1,4 +1,4 @@
-WriteStream in cu29_traits - Rust

Trait WriteStream

Source
pub trait WriteStream<E: Encode>:
+WriteStream in cu29_traits - Rust

Trait WriteStream

Source
pub trait WriteStream<E: Encode>:
     Sync
     + Send
     + Debug {
diff --git a/cu29_traits/type.CuResult.html b/cu29_traits/type.CuResult.html
index f79c50c1a..bf77bfe00 100644
--- a/cu29_traits/type.CuResult.html
+++ b/cu29_traits/type.CuResult.html
@@ -1,4 +1,4 @@
-CuResult in cu29_traits - Rust

Type Alias CuResult

Source
pub type CuResult<T> = Result<T, CuError>;

Aliased Type§

enum CuResult<T> {
+CuResult in cu29_traits - Rust

Type Alias CuResult

Source
pub type CuResult<T> = Result<T, CuError>;

Aliased Type§

enum CuResult<T> {
     Ok(T),
     Err(CuError),
 }

Variants§

§1.0.0

Ok(T)

Contains the success value

diff --git a/cu29_unifiedlog/all.html b/cu29_unifiedlog/all.html index d6a3475b2..b30dfd662 100644 --- a/cu29_unifiedlog/all.html +++ b/cu29_unifiedlog/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/cu29_unifiedlog/enum.AllocatedSection.html b/cu29_unifiedlog/enum.AllocatedSection.html index 4d39892f3..0fe76c9c1 100644 --- a/cu29_unifiedlog/enum.AllocatedSection.html +++ b/cu29_unifiedlog/enum.AllocatedSection.html @@ -1,4 +1,4 @@ -AllocatedSection in cu29_unifiedlog - Rust

Enum AllocatedSection

Source
pub enum AllocatedSection {
+AllocatedSection in cu29_unifiedlog - Rust

Enum AllocatedSection

Source
pub enum AllocatedSection {
     NoMoreSpace,
     Section(SectionHandle),
 }

Variants§

§

NoMoreSpace

§

Section(SectionHandle)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where diff --git a/cu29_unifiedlog/enum.UnifiedLogger.html b/cu29_unifiedlog/enum.UnifiedLogger.html index ee3c6519f..0e39eec48 100644 --- a/cu29_unifiedlog/enum.UnifiedLogger.html +++ b/cu29_unifiedlog/enum.UnifiedLogger.html @@ -1,4 +1,4 @@ -UnifiedLogger in cu29_unifiedlog - Rust

Enum UnifiedLogger

Source
pub enum UnifiedLogger {
+UnifiedLogger in cu29_unifiedlog - Rust

Enum UnifiedLogger

Source
pub enum UnifiedLogger {
     Read(UnifiedLoggerRead),
     Write(UnifiedLoggerWrite),
 }
Expand description

Holder of the read or write side of the datalogger.

diff --git a/cu29_unifiedlog/fn.stream_write.html b/cu29_unifiedlog/fn.stream_write.html index 72a277fc6..b82115f79 100644 --- a/cu29_unifiedlog/fn.stream_write.html +++ b/cu29_unifiedlog/fn.stream_write.html @@ -1,4 +1,4 @@ -stream_write in cu29_unifiedlog - Rust

Function stream_write

Source
pub fn stream_write<E: Encode>(
+stream_write in cu29_unifiedlog - Rust

Function stream_write

Source
pub fn stream_write<E: Encode>(
     logger: Arc<Mutex<UnifiedLoggerWrite>>,
     entry_type: UnifiedLogType,
     minimum_allocation_amount: usize,
diff --git a/cu29_unifiedlog/index.html b/cu29_unifiedlog/index.html
index 2004756a7..5156456f1 100644
--- a/cu29_unifiedlog/index.html
+++ b/cu29_unifiedlog/index.html
@@ -1,4 +1,4 @@
-cu29_unifiedlog - Rust

Crate cu29_unifiedlog

Source

Structs§

SectionHandle
A SectionHandle is a handle to a section in the datalogger. +cu29_unifiedlog - Rust

Crate cu29_unifiedlog

Source

Structs§

SectionHandle
A SectionHandle is a handle to a section in the datalogger. It allows to track the lifecycle of a section of the datalogger.
SectionHeader
Each concurrent sublogger is tracked through a section header. They form a linked list of sections. The entry type is used to identify the type of data in the section.
UnifiedLoggerBuilder
Use this builder to create a new DataLogger.
UnifiedLoggerIOReader
This a convenience wrapper around the UnifiedLoggerRead to implement the Read trait.
UnifiedLoggerRead
A read side of the datalogger.
UnifiedLoggerWrite
A write side of the datalogger.

Enums§

AllocatedSection
UnifiedLogger
Holder of the read or write side of the datalogger.

Functions§

stream_write
Create a new stream to write to the unifiedlogger.
\ No newline at end of file diff --git a/cu29_unifiedlog/struct.SectionHandle.html b/cu29_unifiedlog/struct.SectionHandle.html index a80491781..31c074727 100644 --- a/cu29_unifiedlog/struct.SectionHandle.html +++ b/cu29_unifiedlog/struct.SectionHandle.html @@ -1,4 +1,4 @@ -SectionHandle in cu29_unifiedlog - Rust

Struct SectionHandle

Source
pub struct SectionHandle { /* private fields */ }
Expand description

A SectionHandle is a handle to a section in the datalogger. +SectionHandle in cu29_unifiedlog - Rust

Struct SectionHandle

Source
pub struct SectionHandle { /* private fields */ }
Expand description

A SectionHandle is a handle to a section in the datalogger. It allows to track the lifecycle of a section of the datalogger.

Implementations§

Source§

impl SectionHandle

Source

pub fn create(section_header: SectionHeader, buffer: &'static mut [u8]) -> Self

Source

pub fn get_user_buffer(&mut self) -> &mut [u8]

Source

pub fn update_header(&mut self)

Trait Implementations§

Source§

impl Default for SectionHandle

Source§

fn default() -> SectionHandle

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29_unifiedlog/struct.SectionHeader.html b/cu29_unifiedlog/struct.SectionHeader.html index 7fe6b8f89..9273dbd20 100644 --- a/cu29_unifiedlog/struct.SectionHeader.html +++ b/cu29_unifiedlog/struct.SectionHeader.html @@ -1,4 +1,4 @@ -SectionHeader in cu29_unifiedlog - Rust

Struct SectionHeader

Source
pub struct SectionHeader { /* private fields */ }
Expand description

Each concurrent sublogger is tracked through a section header. +SectionHeader in cu29_unifiedlog - Rust

Struct SectionHeader

Source
pub struct SectionHeader { /* private fields */ }
Expand description

Each concurrent sublogger is tracked through a section header. They form a linked list of sections. The entry type is used to identify the type of data in the section.

Trait Implementations§

Source§

impl<'__de> BorrowDecode<'__de> for SectionHeader

Source§

fn borrow_decode<__D: BorrowDecoder<'__de>>( diff --git a/cu29_unifiedlog/struct.UnifiedLoggerBuilder.html b/cu29_unifiedlog/struct.UnifiedLoggerBuilder.html index 344120c72..f0667a808 100644 --- a/cu29_unifiedlog/struct.UnifiedLoggerBuilder.html +++ b/cu29_unifiedlog/struct.UnifiedLoggerBuilder.html @@ -1,4 +1,4 @@ -UnifiedLoggerBuilder in cu29_unifiedlog - Rust

Struct UnifiedLoggerBuilder

Source
pub struct UnifiedLoggerBuilder { /* private fields */ }
Expand description

Use this builder to create a new DataLogger.

+UnifiedLoggerBuilder in cu29_unifiedlog - Rust

Struct UnifiedLoggerBuilder

Source
pub struct UnifiedLoggerBuilder { /* private fields */ }
Expand description

Use this builder to create a new DataLogger.

Implementations§

Source§

impl UnifiedLoggerBuilder

Source

pub fn new() -> Self

Source

pub fn file_base_name(self, file_path: &Path) -> Self

If “something/toto.copper” is given, it will find or create “something/toto_0.copper”, “something/toto_1.copper” etc.

Source

pub fn preallocated_size(self, preallocated_size: usize) -> Self

Source

pub fn write(self, write: bool) -> Self

Source

pub fn create(self, create: bool) -> Self

Source

pub fn build(self) -> Result<UnifiedLogger>

Trait Implementations§

Source§

impl Default for UnifiedLoggerBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where diff --git a/cu29_unifiedlog/struct.UnifiedLoggerIOReader.html b/cu29_unifiedlog/struct.UnifiedLoggerIOReader.html index f0c5bb780..1e36a1a94 100644 --- a/cu29_unifiedlog/struct.UnifiedLoggerIOReader.html +++ b/cu29_unifiedlog/struct.UnifiedLoggerIOReader.html @@ -1,4 +1,4 @@ -UnifiedLoggerIOReader in cu29_unifiedlog - Rust

Struct UnifiedLoggerIOReader

Source
pub struct UnifiedLoggerIOReader { /* private fields */ }
Expand description

This a convenience wrapper around the UnifiedLoggerRead to implement the Read trait.

+UnifiedLoggerIOReader in cu29_unifiedlog - Rust

Struct UnifiedLoggerIOReader

Source
pub struct UnifiedLoggerIOReader { /* private fields */ }
Expand description

This a convenience wrapper around the UnifiedLoggerRead to implement the Read trait.

Implementations§

Source§

impl UnifiedLoggerIOReader

Source

pub fn new(logger: UnifiedLoggerRead, log_type: UnifiedLogType) -> Self

Trait Implementations§

Source§

impl Read for UnifiedLoggerIOReader

Source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize>

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
1.36.0 · Source§

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
Source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored implementation. Read more
1.0.0 · Source§

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes until EOF in this source, placing them into buf. Read more
1.0.0 · Source§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until EOF in this source, appending them to buf. Read more
1.6.0 · Source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf. Read more
Source§

fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
Source§

fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Reads the exact number of bytes required to fill cursor. Read more
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where diff --git a/cu29_unifiedlog/struct.UnifiedLoggerRead.html b/cu29_unifiedlog/struct.UnifiedLoggerRead.html index d817ef713..7c368e634 100644 --- a/cu29_unifiedlog/struct.UnifiedLoggerRead.html +++ b/cu29_unifiedlog/struct.UnifiedLoggerRead.html @@ -1,4 +1,4 @@ -UnifiedLoggerRead in cu29_unifiedlog - Rust

Struct UnifiedLoggerRead

Source
pub struct UnifiedLoggerRead { /* private fields */ }
Expand description

A read side of the datalogger.

+UnifiedLoggerRead in cu29_unifiedlog - Rust

Struct UnifiedLoggerRead

Source
pub struct UnifiedLoggerRead { /* private fields */ }
Expand description

A read side of the datalogger.

Implementations§

Source§

impl UnifiedLoggerRead

Source

pub fn new(base_file_path: &Path) -> Result<Self>

Source

pub fn read_next_section_type( &mut self, datalogtype: UnifiedLogType, diff --git a/cu29_unifiedlog/struct.UnifiedLoggerWrite.html b/cu29_unifiedlog/struct.UnifiedLoggerWrite.html index 0c0191370..58d5c96ee 100644 --- a/cu29_unifiedlog/struct.UnifiedLoggerWrite.html +++ b/cu29_unifiedlog/struct.UnifiedLoggerWrite.html @@ -1,4 +1,4 @@ -UnifiedLoggerWrite in cu29_unifiedlog - Rust

Struct UnifiedLoggerWrite

Source
pub struct UnifiedLoggerWrite { /* private fields */ }
Expand description

A write side of the datalogger.

+UnifiedLoggerWrite in cu29_unifiedlog - Rust

Struct UnifiedLoggerWrite

Source
pub struct UnifiedLoggerWrite { /* private fields */ }
Expand description

A write side of the datalogger.

Implementations§

Source§

impl UnifiedLoggerWrite

Source

pub fn flush_section(&mut self, section: &mut SectionHandle)

Source

pub fn stats(&self) -> (usize, Vec<usize>, usize)

Trait Implementations§

Source§

impl Drop for UnifiedLoggerWrite

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where diff --git a/help.html b/help.html index 2d4a5941b..43fc98cfd 100644 --- a/help.html +++ b/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/index.html b/index.html index 3a1c7f189..a493519fc 100644 --- a/index.html +++ b/index.html @@ -1,2 +1,2 @@ -Index of crates
+Index of crates
\ No newline at end of file diff --git a/settings.html b/settings.html index 454af0574..98cc83cbc 100644 --- a/settings.html +++ b/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/src/cu29/lib.rs.html b/src/cu29/lib.rs.html index a8bcb836b..9f19338cb 100644 --- a/src/cu29/lib.rs.html +++ b/src/cu29/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source

cu29/
lib.rs

+lib.rs - source

cu29/
lib.rs

 1
 2
 3
diff --git a/src/cu29_clock/lib.rs.html b/src/cu29_clock/lib.rs.html
index d2f9d5dec..98e99ba76 100644
--- a/src/cu29_clock/lib.rs.html
+++ b/src/cu29_clock/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_clock/
lib.rs

+lib.rs - source

cu29_clock/
lib.rs

 1
 2
 3
diff --git a/src/cu29_derive/format.rs.html b/src/cu29_derive/format.rs.html
index 095e0368b..b0d4c1d4e 100644
--- a/src/cu29_derive/format.rs.html
+++ b/src/cu29_derive/format.rs.html
@@ -1,4 +1,4 @@
-format.rs - source

cu29_derive/
format.rs

+format.rs - source

cu29_derive/
format.rs

 1
 2
 3
diff --git a/src/cu29_derive/lib.rs.html b/src/cu29_derive/lib.rs.html
index 22604beff..c4c8750b0 100644
--- a/src/cu29_derive/lib.rs.html
+++ b/src/cu29_derive/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_derive/
lib.rs

+lib.rs - source

cu29_derive/
lib.rs

 1
 2
 3
diff --git a/src/cu29_derive/utils.rs.html b/src/cu29_derive/utils.rs.html
index d1300f730..d60f5a427 100644
--- a/src/cu29_derive/utils.rs.html
+++ b/src/cu29_derive/utils.rs.html
@@ -1,4 +1,4 @@
-utils.rs - source

cu29_derive/
utils.rs

+utils.rs - source

cu29_derive/
utils.rs

 1
 2
 3
diff --git a/src/cu29_export/lib.rs.html b/src/cu29_export/lib.rs.html
index c06ddcf3a..a803a87fd 100644
--- a/src/cu29_export/lib.rs.html
+++ b/src/cu29_export/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_export/
lib.rs

+lib.rs - source

cu29_export/
lib.rs

 1
 2
 3
diff --git a/src/cu29_helpers/lib.rs.html b/src/cu29_helpers/lib.rs.html
index c578bd2f2..1a89ad2e6 100644
--- a/src/cu29_helpers/lib.rs.html
+++ b/src/cu29_helpers/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_helpers/
lib.rs

+lib.rs - source

cu29_helpers/
lib.rs

 1
 2
 3
diff --git a/src/cu29_intern_strs/lib.rs.html b/src/cu29_intern_strs/lib.rs.html
index cb839a2d3..341f9fb50 100644
--- a/src/cu29_intern_strs/lib.rs.html
+++ b/src/cu29_intern_strs/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_intern_strs/
lib.rs

+lib.rs - source

cu29_intern_strs/
lib.rs

 1
 2
 3
diff --git a/src/cu29_log/lib.rs.html b/src/cu29_log/lib.rs.html
index 948e15cae..35d1433c2 100644
--- a/src/cu29_log/lib.rs.html
+++ b/src/cu29_log/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_log/
lib.rs

+lib.rs - source

cu29_log/
lib.rs

 1
 2
 3
diff --git a/src/cu29_log_derive/index.rs.html b/src/cu29_log_derive/index.rs.html
index 3919bee45..ba66d3c3c 100644
--- a/src/cu29_log_derive/index.rs.html
+++ b/src/cu29_log_derive/index.rs.html
@@ -1,4 +1,4 @@
-index.rs - source

cu29_log_derive/
index.rs

+index.rs - source

cu29_log_derive/
index.rs

 1
 2
 3
diff --git a/src/cu29_log_derive/lib.rs.html b/src/cu29_log_derive/lib.rs.html
index 9242f8cd8..79c2f71c4 100644
--- a/src/cu29_log_derive/lib.rs.html
+++ b/src/cu29_log_derive/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_log_derive/
lib.rs

+lib.rs - source

cu29_log_derive/
lib.rs

 1
 2
 3
diff --git a/src/cu29_log_runtime/lib.rs.html b/src/cu29_log_runtime/lib.rs.html
index 9179f6ce0..49fc4e085 100644
--- a/src/cu29_log_runtime/lib.rs.html
+++ b/src/cu29_log_runtime/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_log_runtime/
lib.rs

+lib.rs - source

cu29_log_runtime/
lib.rs

 1
 2
 3
diff --git a/src/cu29_rendercfg/config.rs.html b/src/cu29_rendercfg/config.rs.html
index 6f86d228f..5d50b7628 100644
--- a/src/cu29_rendercfg/config.rs.html
+++ b/src/cu29_rendercfg/config.rs.html
@@ -1,4 +1,4 @@
-config.rs - source

cu29_rendercfg/
config.rs

+config.rs - source

cu29_rendercfg/
config.rs

 1
 2
 3
diff --git a/src/cu29_rendercfg/rendercfg.rs.html b/src/cu29_rendercfg/rendercfg.rs.html
index 9c2312a88..b2fe9dbb2 100644
--- a/src/cu29_rendercfg/rendercfg.rs.html
+++ b/src/cu29_rendercfg/rendercfg.rs.html
@@ -1,4 +1,4 @@
-rendercfg.rs - source

cu29_rendercfg/
rendercfg.rs

+rendercfg.rs - source

cu29_rendercfg/
rendercfg.rs

 1
 2
 3
diff --git a/src/cu29_runtime/config.rs.html b/src/cu29_runtime/config.rs.html
index c2bba4b27..046fbc35b 100644
--- a/src/cu29_runtime/config.rs.html
+++ b/src/cu29_runtime/config.rs.html
@@ -1,4 +1,4 @@
-config.rs - source

cu29_runtime/
config.rs

+config.rs - source

cu29_runtime/
config.rs

 1
 2
 3
diff --git a/src/cu29_runtime/copperlist.rs.html b/src/cu29_runtime/copperlist.rs.html
index 4301415b9..7fc6ecb0c 100644
--- a/src/cu29_runtime/copperlist.rs.html
+++ b/src/cu29_runtime/copperlist.rs.html
@@ -1,4 +1,4 @@
-copperlist.rs - source

cu29_runtime/
copperlist.rs

+copperlist.rs - source

cu29_runtime/
copperlist.rs

 1
 2
 3
diff --git a/src/cu29_runtime/curuntime.rs.html b/src/cu29_runtime/curuntime.rs.html
index 9d9a522d6..306816110 100644
--- a/src/cu29_runtime/curuntime.rs.html
+++ b/src/cu29_runtime/curuntime.rs.html
@@ -1,4 +1,4 @@
-curuntime.rs - source

cu29_runtime/
curuntime.rs

+curuntime.rs - source

cu29_runtime/
curuntime.rs

 1
 2
 3
diff --git a/src/cu29_runtime/cutask.rs.html b/src/cu29_runtime/cutask.rs.html
index a833e7bb4..42479b875 100644
--- a/src/cu29_runtime/cutask.rs.html
+++ b/src/cu29_runtime/cutask.rs.html
@@ -1,4 +1,4 @@
-cutask.rs - source

cu29_runtime/
cutask.rs

+cutask.rs - source

cu29_runtime/
cutask.rs

 1
 2
 3
diff --git a/src/cu29_runtime/lib.rs.html b/src/cu29_runtime/lib.rs.html
index 24026de2d..9a1281d1c 100644
--- a/src/cu29_runtime/lib.rs.html
+++ b/src/cu29_runtime/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_runtime/
lib.rs

+lib.rs - source

cu29_runtime/
lib.rs

 1
 2
 3
diff --git a/src/cu29_runtime/log.rs.html b/src/cu29_runtime/log.rs.html
index 0b540fda8..b519fa448 100644
--- a/src/cu29_runtime/log.rs.html
+++ b/src/cu29_runtime/log.rs.html
@@ -1,4 +1,4 @@
-log.rs - source

cu29_runtime/
log.rs

+log.rs - source

cu29_runtime/
log.rs

 1
 2
 3
diff --git a/src/cu29_runtime/monitoring.rs.html b/src/cu29_runtime/monitoring.rs.html
index 5c60a43fc..1bceddbd8 100644
--- a/src/cu29_runtime/monitoring.rs.html
+++ b/src/cu29_runtime/monitoring.rs.html
@@ -1,4 +1,4 @@
-monitoring.rs - source

cu29_runtime/
monitoring.rs

+monitoring.rs - source

cu29_runtime/
monitoring.rs

 1
 2
 3
diff --git a/src/cu29_runtime/payload.rs.html b/src/cu29_runtime/payload.rs.html
index 2e5610539..055a2a022 100644
--- a/src/cu29_runtime/payload.rs.html
+++ b/src/cu29_runtime/payload.rs.html
@@ -1,4 +1,4 @@
-payload.rs - source

cu29_runtime/
payload.rs

+payload.rs - source

cu29_runtime/
payload.rs

 1
 2
 3
diff --git a/src/cu29_runtime/pool.rs.html b/src/cu29_runtime/pool.rs.html
index cb521ddac..2a68f39f1 100644
--- a/src/cu29_runtime/pool.rs.html
+++ b/src/cu29_runtime/pool.rs.html
@@ -1,4 +1,4 @@
-pool.rs - source

cu29_runtime/
pool.rs

+pool.rs - source

cu29_runtime/
pool.rs

 1
 2
 3
diff --git a/src/cu29_runtime/simulation.rs.html b/src/cu29_runtime/simulation.rs.html
index bafee3dae..2039703a7 100644
--- a/src/cu29_runtime/simulation.rs.html
+++ b/src/cu29_runtime/simulation.rs.html
@@ -1,4 +1,4 @@
-simulation.rs - source

cu29_runtime/
simulation.rs

+simulation.rs - source

cu29_runtime/
simulation.rs

 1
 2
 3
diff --git a/src/cu29_soa_derive/format.rs.html b/src/cu29_soa_derive/format.rs.html
index 0d3748fcb..ac3872493 100644
--- a/src/cu29_soa_derive/format.rs.html
+++ b/src/cu29_soa_derive/format.rs.html
@@ -1,4 +1,4 @@
-format.rs - source

cu29_soa_derive/
format.rs

+format.rs - source

cu29_soa_derive/
format.rs

 1
 2
 3
diff --git a/src/cu29_soa_derive/lib.rs.html b/src/cu29_soa_derive/lib.rs.html
index 52b8cac81..685eec214 100644
--- a/src/cu29_soa_derive/lib.rs.html
+++ b/src/cu29_soa_derive/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_soa_derive/
lib.rs

+lib.rs - source

cu29_soa_derive/
lib.rs

 1
 2
 3
diff --git a/src/cu29_traits/lib.rs.html b/src/cu29_traits/lib.rs.html
index ddfe59c74..5ab4fdacb 100644
--- a/src/cu29_traits/lib.rs.html
+++ b/src/cu29_traits/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_traits/
lib.rs

+lib.rs - source

cu29_traits/
lib.rs

 1
 2
 3
diff --git a/src/cu29_unifiedlog/lib.rs.html b/src/cu29_unifiedlog/lib.rs.html
index 03cd5db75..5e4912e41 100644
--- a/src/cu29_unifiedlog/lib.rs.html
+++ b/src/cu29_unifiedlog/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source

cu29_unifiedlog/
lib.rs

+lib.rs - source

cu29_unifiedlog/
lib.rs

 1
 2
 3
diff --git a/type.impl/core/result/enum.Result.js b/type.impl/core/result/enum.Result.js
index d26a64778..ce8f4811c 100644
--- a/type.impl/core/result/enum.Result.js
+++ b/type.impl/core/result/enum.Result.js
@@ -1,9 +1,9 @@
 (function() {
-    var type_impls = Object.fromEntries([["cu29",[["
Source§

impl<'de, T, U> BorrowDecode<'de> for Result<T, U>
where\n T: BorrowDecode<'de>,\n U: BorrowDecode<'de>,

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

Source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","cu29::CuResult"],["
Source§

impl<C, E> ControlFlow for Result<C, E>
where\n C: ControlFlow,

","ControlFlow","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","cu29::CuResult"],["
Source§

impl<T, U> Decode for Result<T, U>
where\n T: Decode,\n U: Decode,

Source§

fn decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cu29::CuResult"],["
Source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29::CuResult"],["
Source§

impl<T, U> Encode for Result<T, U>
where\n T: Encode,\n U: Encode,

Source§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cu29::CuResult"],["
1.0.0 · Source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

Source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","cu29::CuResult"],["
Source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29::CuResult"],["
Source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> IntoIterator for Result<T, E>

Source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

Source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

Source§

fn eq(&self, other: &Result<T, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

Source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

Source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","cu29::CuResult"],["
Source§

impl<T, E> Residual<T> for Result<Infallible, E>

Source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","cu29::CuResult"],["
Source§

impl<T, E> Result<&T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Result<&mut T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: 1.83.0) · Source

pub const fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Result<Result<T, E>, E>

Source

pub const fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · Source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · Source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · Source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · Source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · Source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · Source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: 1.83.0) · Source

pub const fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · Source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · Source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · Source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · Source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · Source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · Source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · Source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · Source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · Source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · Source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nPanics are meant for unrecoverable errors, and\nmay abort the entire program.

\n

Instead, prefer to use the ? (try) operator, or pattern matching\nto handle the Err case explicitly, or call unwrap_or,\nunwrap_or_else, or unwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · Source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · Source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · Source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
Source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
Source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · Source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · Source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · Source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · Source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · Source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · Source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · Source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · Source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

Source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

Source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","cu29::CuResult"],["
1.61.0 · Source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

Source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","cu29::CuResult"],["
Source§

impl<T, E> Try for Result<T, E>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
Source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","cu29::CuResult"],["
§

impl<T, E> TryWriteable for Result<T, E>
where\n T: Writeable,\n E: Writeable + Clone,

§

type Error = E

§

fn try_write_to<W>(\n &self,\n sink: &mut W,\n) -> Result<Result<(), <Result<T, E> as TryWriteable>::Error>, Error>
where\n W: Write + ?Sized,

Writes the content of this writeable to a sink. Read more
§

fn try_write_to_parts<S>(\n &self,\n sink: &mut S,\n) -> Result<Result<(), <Result<T, E> as TryWriteable>::Error>, Error>
where\n S: PartsWrite + ?Sized,

Writes the content of this writeable to a sink with parts (annotations). Read more
§

fn writeable_length_hint(&self) -> LengthHint

Returns a hint for the number of UTF-8 bytes that will be written to the sink. Read more
§

fn try_write_to_string(\n &self,\n) -> Result<Cow<'_, str>, (<Result<T, E> as TryWriteable>::Error, Cow<'_, str>)>

Writes the content of this writeable to a string. Read more
§

fn writeable_cmp_bytes(&self, other: &[u8]) -> Ordering

Compares the content of this writeable to a byte slice. Read more
","TryWriteable","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","cu29::CuResult"],["
§

impl<T, E> LifetimeFree for Result<T, E>
where\n T: LifetimeFree,\n E: LifetimeFree,

","LifetimeFree","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","cu29::CuResult"]]],["cu29_rendercfg",[["
Source§

impl<'de, T, U> BorrowDecode<'de> for Result<T, U>
where\n T: BorrowDecode<'de>,\n U: BorrowDecode<'de>,

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

Source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","cu29_rendercfg::CuResult"],["
Source§

impl<C, E> ControlFlow for Result<C, E>
where\n C: ControlFlow,

","ControlFlow","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","cu29_rendercfg::CuResult"],["
Source§

impl<T, U> Decode for Result<T, U>
where\n T: Decode,\n U: Decode,

Source§

fn decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cu29_rendercfg::CuResult"],["
Source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29_rendercfg::CuResult"],["
Source§

impl<T, U> Encode for Result<T, U>
where\n T: Encode,\n U: Encode,

Source§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

Source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","cu29_rendercfg::CuResult"],["
Source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29_rendercfg::CuResult"],["
Source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> IntoIterator for Result<T, E>

Source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

Source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

Source§

fn eq(&self, other: &Result<T, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

Source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29_rendercfg::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

Source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Residual<T> for Result<Infallible, E>

Source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<&T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<&mut T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: 1.83.0) · Source

pub const fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<Result<T, E>, E>

Source

pub const fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · Source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · Source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · Source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · Source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · Source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · Source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: 1.83.0) · Source

pub const fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · Source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · Source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · Source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · Source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · Source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · Source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · Source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · Source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · Source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · Source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nPanics are meant for unrecoverable errors, and\nmay abort the entire program.

\n

Instead, prefer to use the ? (try) operator, or pattern matching\nto handle the Err case explicitly, or call unwrap_or,\nunwrap_or_else, or unwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · Source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · Source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · Source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
Source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
Source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · Source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · Source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · Source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · Source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · Source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · Source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · Source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · Source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

Source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29_rendercfg::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

Source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","cu29_rendercfg::CuResult"],["
1.61.0 · Source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

Source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Try for Result<T, E>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
Source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","cu29_rendercfg::CuResult"]]],["cu29_traits",[["
Source§

impl<'de, T, U> BorrowDecode<'de> for Result<T, U>
where\n T: BorrowDecode<'de>,\n U: BorrowDecode<'de>,

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

Source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","cu29_traits::CuResult"],["
Source§

impl<T, U> Decode for Result<T, U>
where\n T: Decode,\n U: Decode,

Source§

fn decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cu29_traits::CuResult"],["
Source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29_traits::CuResult"],["
Source§

impl<T, U> Encode for Result<T, U>
where\n T: Encode,\n U: Encode,

Source§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

Source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","cu29_traits::CuResult"],["
Source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29_traits::CuResult"],["
Source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> IntoIterator for Result<T, E>

Source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

Source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

Source§

fn eq(&self, other: &Result<T, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

Source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29_traits::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

Source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","cu29_traits::CuResult"],["
Source§

impl<T, E> Residual<T> for Result<Infallible, E>

Source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","cu29_traits::CuResult"],["
Source§

impl<T, E> Result<&T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Result<&mut T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: 1.83.0) · Source

pub const fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Result<Result<T, E>, E>

Source

pub const fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · Source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · Source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · Source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · Source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · Source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · Source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: 1.83.0) · Source

pub const fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · Source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · Source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · Source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · Source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · Source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · Source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · Source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · Source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · Source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · Source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nPanics are meant for unrecoverable errors, and\nmay abort the entire program.

\n

Instead, prefer to use the ? (try) operator, or pattern matching\nto handle the Err case explicitly, or call unwrap_or,\nunwrap_or_else, or unwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · Source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · Source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · Source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
Source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
Source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · Source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · Source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · Source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · Source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · Source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · Source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · Source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · Source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

Source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29_traits::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

Source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","cu29_traits::CuResult"],["
1.61.0 · Source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

Source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","cu29_traits::CuResult"],["
Source§

impl<T, E> Try for Result<T, E>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
Source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","cu29_traits::CuResult"]]]]); + var type_impls = Object.fromEntries([["cu29",[["
Source§

impl<'de, T, U> BorrowDecode<'de> for Result<T, U>
where\n T: BorrowDecode<'de>,\n U: BorrowDecode<'de>,

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

Source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","cu29::CuResult"],["
Source§

impl<C, E> ControlFlow for Result<C, E>
where\n C: ControlFlow,

","ControlFlow","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","cu29::CuResult"],["
Source§

impl<T, U> Decode for Result<T, U>
where\n T: Decode,\n U: Decode,

Source§

fn decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cu29::CuResult"],["
Source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29::CuResult"],["
Source§

impl<T, U> Encode for Result<T, U>
where\n T: Encode,\n U: Encode,

Source§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cu29::CuResult"],["
1.0.0 · Source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

Source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","cu29::CuResult"],["
Source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29::CuResult"],["
Source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> IntoIterator for Result<T, E>

Source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

Source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

Source§

fn eq(&self, other: &Result<T, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

Source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

Source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","cu29::CuResult"],["
Source§

impl<T, E> Residual<T> for Result<Infallible, E>

Source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","cu29::CuResult"],["
Source§

impl<T, E> Result<&T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Result<&mut T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: 1.83.0) · Source

pub const fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Result<Result<T, E>, E>

Source

pub const fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · Source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · Source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · Source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · Source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · Source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · Source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: 1.83.0) · Source

pub const fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · Source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · Source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · Source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · Source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · Source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · Source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · Source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · Source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · Source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · Source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nPanics are meant for unrecoverable errors, and\nmay abort the entire program.

\n

Instead, prefer to use the ? (try) operator, or pattern matching\nto handle the Err case explicitly, or call unwrap_or,\nunwrap_or_else, or unwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · Source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · Source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · Source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
Source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
Source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · Source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · Source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · Source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · Source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · Source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · Source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · Source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · Source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"cu29::CuResult"],["
Source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

Source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

Source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","cu29::CuResult"],["
1.61.0 · Source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

Source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","cu29::CuResult"],["
Source§

impl<T, E> Try for Result<T, E>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
Source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","cu29::CuResult"],["
§

impl<T, E> TryWriteable for Result<T, E>
where\n T: Writeable,\n E: Writeable + Clone,

§

type Error = E

§

fn try_write_to<W>(\n &self,\n sink: &mut W,\n) -> Result<Result<(), <Result<T, E> as TryWriteable>::Error>, Error>
where\n W: Write + ?Sized,

Writes the content of this writeable to a sink. Read more
§

fn try_write_to_parts<S>(\n &self,\n sink: &mut S,\n) -> Result<Result<(), <Result<T, E> as TryWriteable>::Error>, Error>
where\n S: PartsWrite + ?Sized,

Writes the content of this writeable to a sink with parts (annotations). Read more
§

fn writeable_length_hint(&self) -> LengthHint

Returns a hint for the number of UTF-8 bytes that will be written to the sink. Read more
§

fn try_write_to_string(\n &self,\n) -> Result<Cow<'_, str>, (<Result<T, E> as TryWriteable>::Error, Cow<'_, str>)>

Writes the content of this writeable to a string. Read more
§

fn writeable_cmp_bytes(&self, other: &[u8]) -> Ordering

Compares the content of this writeable to a byte slice. Read more
","TryWriteable","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","cu29::CuResult"],["
§

impl<T, E> LifetimeFree for Result<T, E>
where\n T: LifetimeFree,\n E: LifetimeFree,

","LifetimeFree","cu29::CuResult"],["
1.0.0 · Source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","cu29::CuResult"]]],["cu29_rendercfg",[["
Source§

impl<'de, T, U> BorrowDecode<'de> for Result<T, U>
where\n T: BorrowDecode<'de>,\n U: BorrowDecode<'de>,

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

Source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","cu29_rendercfg::CuResult"],["
Source§

impl<C, E> ControlFlow for Result<C, E>
where\n C: ControlFlow,

","ControlFlow","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","cu29_rendercfg::CuResult"],["
Source§

impl<T, U> Decode for Result<T, U>
where\n T: Decode,\n U: Decode,

Source§

fn decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cu29_rendercfg::CuResult"],["
Source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29_rendercfg::CuResult"],["
Source§

impl<T, U> Encode for Result<T, U>
where\n T: Encode,\n U: Encode,

Source§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

Source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","cu29_rendercfg::CuResult"],["
Source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29_rendercfg::CuResult"],["
Source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> IntoIterator for Result<T, E>

Source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

Source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

Source§

fn eq(&self, other: &Result<T, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

Source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29_rendercfg::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

Source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Residual<T> for Result<Infallible, E>

Source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<&T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<&mut T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: 1.83.0) · Source

pub const fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<Result<T, E>, E>

Source

pub const fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · Source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · Source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · Source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · Source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · Source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · Source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: 1.83.0) · Source

pub const fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · Source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · Source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · Source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · Source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · Source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · Source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · Source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · Source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · Source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · Source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nPanics are meant for unrecoverable errors, and\nmay abort the entire program.

\n

Instead, prefer to use the ? (try) operator, or pattern matching\nto handle the Err case explicitly, or call unwrap_or,\nunwrap_or_else, or unwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · Source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · Source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · Source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
Source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
Source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · Source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · Source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · Source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · Source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · Source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · Source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · Source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · Source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

Source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29_rendercfg::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

Source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","cu29_rendercfg::CuResult"],["
1.61.0 · Source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

Source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","cu29_rendercfg::CuResult"],["
Source§

impl<T, E> Try for Result<T, E>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
Source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","cu29_rendercfg::CuResult"],["
1.0.0 · Source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","cu29_rendercfg::CuResult"]]],["cu29_traits",[["
Source§

impl<'de, T, U> BorrowDecode<'de> for Result<T, U>
where\n T: BorrowDecode<'de>,\n U: BorrowDecode<'de>,

Source§

fn borrow_decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

Source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","cu29_traits::CuResult"],["
Source§

impl<T, U> Decode for Result<T, U>
where\n T: Decode,\n U: Decode,

Source§

fn decode<D>(decoder: &mut D) -> Result<Result<T, U>, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cu29_traits::CuResult"],["
Source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29_traits::CuResult"],["
Source§

impl<T, U> Encode for Result<T, U>
where\n T: Encode,\n U: Encode,

Source§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

Source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","cu29_traits::CuResult"],["
Source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29_traits::CuResult"],["
Source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

Source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> IntoIterator for Result<T, E>

Source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

Source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

Source§

fn eq(&self, other: &Result<T, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

Source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29_traits::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

Source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","cu29_traits::CuResult"],["
Source§

impl<T, E> Residual<T> for Result<Infallible, E>

Source§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","cu29_traits::CuResult"],["
Source§

impl<T, E> Result<&T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Result<&mut T, E>

1.59.0 (const: 1.83.0) · Source

pub const fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · Source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: 1.83.0) · Source

pub const fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Result<Result<T, E>, E>

Source

pub const fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · Source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · Source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · Source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · Source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · Source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · Source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · Source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: 1.83.0) · Source

pub const fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · Source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · Source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · Source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · Source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · Source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · Source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · Source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · Source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · Source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · Source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nPanics are meant for unrecoverable errors, and\nmay abort the entire program.

\n

Instead, prefer to use the ? (try) operator, or pattern matching\nto handle the Err case explicitly, or call unwrap_or,\nunwrap_or_else, or unwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · Source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · Source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · Source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
Source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
Source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · Source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · Source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · Source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · Source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · Source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · Source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · Source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · Source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"cu29_traits::CuResult"],["
Source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

Source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29_traits::CuResult"],["
1.16.0 · Source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

Source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","cu29_traits::CuResult"],["
1.61.0 · Source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

Source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","cu29_traits::CuResult"],["
Source§

impl<T, E> Try for Result<T, E>

Source§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
Source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","cu29_traits::CuResult"],["
1.0.0 · Source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","cu29_traits::CuResult"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() -//{"start":55,"fragment_lengths":[182196,175770,173031]} \ No newline at end of file +//{"start":55,"fragment_lengths":[182197,175771,173032]} \ No newline at end of file diff --git a/type.impl/cu29/prelude/struct.CuDuration.js b/type.impl/cu29/prelude/struct.CuDuration.js index 0010060c5..3c595ac9d 100644 --- a/type.impl/cu29/prelude/struct.CuDuration.js +++ b/type.impl/cu29/prelude/struct.CuDuration.js @@ -1,9 +1,9 @@ (function() { - var type_impls = Object.fromEntries([["cu29",[["
§

impl Add for CuDuration

§

type Output = CuDuration

The resulting type after applying the + operator.
§

fn add(self, rhs: CuDuration) -> <CuDuration as Add>::Output

Performs the + operation. Read more
","Add","cu29::prelude::CuTime"],["
§

impl AddAssign for CuDuration

§

fn add_assign(&mut self, rhs: CuDuration)

Performs the += operation. Read more
","AddAssign","cu29::prelude::CuTime"],["
§

impl<'de> BorrowDecode<'de> for CuDuration

§

fn borrow_decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29::prelude::CuTime"],["
§

impl Clone for CuDuration

§

fn clone(&self) -> CuDuration

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","cu29::prelude::CuTime"],["
§

impl CuDuration

pub const MIN: CuDuration

pub const MAX: CuDuration

pub fn max(&self, p0: CuDuration) -> CuDuration

pub fn min(&self, p0: CuDuration) -> CuDuration

pub fn as_nanos(&self) -> u64

",0,"cu29::prelude::CuTime"],["
§

impl Debug for CuDuration

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","cu29::prelude::CuTime"],["
§

impl Decode for CuDuration

§

fn decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cu29::prelude::CuTime"],["
§

impl Default for CuDuration

§

fn default() -> CuDuration

Returns the “default value” for a type. Read more
","Default","cu29::prelude::CuTime"],["
§

impl<'de> Deserialize<'de> for CuDuration

§

fn deserialize<__D>(\n __deserializer: __D,\n) -> Result<CuDuration, <__D as Deserializer<'de>>::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29::prelude::CuTime"],["
§

impl Display for CuDuration

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Display","cu29::prelude::CuTime"],["
§

impl<T> Div<T> for CuDuration
where\n T: Into<u64>,

§

type Output = CuDuration

The resulting type after applying the / operator.
§

fn div(self, rhs: T) -> CuDuration

Performs the / operation. Read more
","Div","cu29::prelude::CuTime"],["
§

impl Encode for CuDuration

§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cu29::prelude::CuTime"],["
§

impl From<Duration> for CuDuration

bridge the API with standard Durations.

\n
§

fn from(duration: Duration) -> CuDuration

Converts to this type from the input type.
","From","cu29::prelude::CuTime"],["
§

impl From<u64> for CuDuration

§

fn from(duration: u64) -> CuDuration

Converts to this type from the input type.
","From","cu29::prelude::CuTime"],["
§

impl<T> Mul<T> for CuDuration
where\n T: Into<u64>,

§

type Output = CuDuration

The resulting type after applying the * operator.
§

fn mul(self, rhs: T) -> CuDuration

Performs the * operation. Read more
","Mul","cu29::prelude::CuTime"],["
§

impl Ord for CuDuration

§

fn cmp(&self, other: &CuDuration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29::prelude::CuTime"],["
§

impl PartialEq for CuDuration

§

fn eq(&self, other: &CuDuration) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29::prelude::CuTime"],["
§

impl PartialOrd for CuDuration

§

fn partial_cmp(&self, other: &CuDuration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29::prelude::CuTime"],["
§

impl Serialize for CuDuration

§

fn serialize<__S>(\n &self,\n __serializer: __S,\n) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where\n __S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29::prelude::CuTime"],["
§

impl Sub for CuDuration

§

type Output = CuDuration

The resulting type after applying the - operator.
§

fn sub(self, rhs: CuDuration) -> <CuDuration as Sub>::Output

Performs the - operation. Read more
","Sub","cu29::prelude::CuTime"],["
§

impl SubAssign for CuDuration

§

fn sub_assign(&mut self, rhs: CuDuration)

Performs the -= operation. Read more
","SubAssign","cu29::prelude::CuTime"],["
§

impl Copy for CuDuration

","Copy","cu29::prelude::CuTime"],["
§

impl Eq for CuDuration

","Eq","cu29::prelude::CuTime"],["
§

impl StructuralPartialEq for CuDuration

","StructuralPartialEq","cu29::prelude::CuTime"]]]]); + var type_impls = Object.fromEntries([["cu29",[["
§

impl Add for CuDuration

§

type Output = CuDuration

The resulting type after applying the + operator.
§

fn add(self, rhs: CuDuration) -> <CuDuration as Add>::Output

Performs the + operation. Read more
","Add","cu29::prelude::CuTime"],["
§

impl AddAssign for CuDuration

§

fn add_assign(&mut self, rhs: CuDuration)

Performs the += operation. Read more
","AddAssign","cu29::prelude::CuTime"],["
§

impl<'de> BorrowDecode<'de> for CuDuration

§

fn borrow_decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>
where\n D: BorrowDecoder<'de>,

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29::prelude::CuTime"],["
§

impl Clone for CuDuration

§

fn clone(&self) -> CuDuration

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","cu29::prelude::CuTime"],["
§

impl CuDuration

pub const MIN: CuDuration

pub const MAX: CuDuration

pub fn max(&self, p0: CuDuration) -> CuDuration

pub fn min(&self, p0: CuDuration) -> CuDuration

pub fn as_nanos(&self) -> u64

",0,"cu29::prelude::CuTime"],["
§

impl Debug for CuDuration

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","cu29::prelude::CuTime"],["
§

impl Decode for CuDuration

§

fn decode<D>(decoder: &mut D) -> Result<CuDuration, DecodeError>
where\n D: Decoder,

Attempt to decode this type with the given Decode.
","Decode","cu29::prelude::CuTime"],["
§

impl Default for CuDuration

§

fn default() -> CuDuration

Returns the “default value” for a type. Read more
","Default","cu29::prelude::CuTime"],["
§

impl<'de> Deserialize<'de> for CuDuration

§

fn deserialize<__D>(\n __deserializer: __D,\n) -> Result<CuDuration, <__D as Deserializer<'de>>::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29::prelude::CuTime"],["
§

impl Display for CuDuration

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Display","cu29::prelude::CuTime"],["
§

impl<T> Div<T> for CuDuration
where\n T: Into<u64>,

§

type Output = CuDuration

The resulting type after applying the / operator.
§

fn div(self, rhs: T) -> CuDuration

Performs the / operation. Read more
","Div","cu29::prelude::CuTime"],["
§

impl Encode for CuDuration

§

fn encode<E>(&self, encoder: &mut E) -> Result<(), EncodeError>
where\n E: Encoder,

Encode a given type.
","Encode","cu29::prelude::CuTime"],["
§

impl From<Duration> for CuDuration

bridge the API with standard Durations.

\n
§

fn from(duration: Duration) -> CuDuration

Converts to this type from the input type.
","From","cu29::prelude::CuTime"],["
§

impl From<u64> for CuDuration

§

fn from(duration: u64) -> CuDuration

Converts to this type from the input type.
","From","cu29::prelude::CuTime"],["
§

impl<T> Mul<T> for CuDuration
where\n T: Into<u64>,

§

type Output = CuDuration

The resulting type after applying the * operator.
§

fn mul(self, rhs: T) -> CuDuration

Performs the * operation. Read more
","Mul","cu29::prelude::CuTime"],["
§

impl Ord for CuDuration

§

fn cmp(&self, other: &CuDuration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29::prelude::CuTime"],["
§

impl PartialEq for CuDuration

§

fn eq(&self, other: &CuDuration) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29::prelude::CuTime"],["
§

impl PartialOrd for CuDuration

§

fn partial_cmp(&self, other: &CuDuration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29::prelude::CuTime"],["
§

impl Serialize for CuDuration

§

fn serialize<__S>(\n &self,\n __serializer: __S,\n) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where\n __S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29::prelude::CuTime"],["
§

impl Sub for CuDuration

§

type Output = CuDuration

The resulting type after applying the - operator.
§

fn sub(self, rhs: CuDuration) -> <CuDuration as Sub>::Output

Performs the - operation. Read more
","Sub","cu29::prelude::CuTime"],["
§

impl SubAssign for CuDuration

§

fn sub_assign(&mut self, rhs: CuDuration)

Performs the -= operation. Read more
","SubAssign","cu29::prelude::CuTime"],["
§

impl Copy for CuDuration

","Copy","cu29::prelude::CuTime"],["
§

impl Eq for CuDuration

","Eq","cu29::prelude::CuTime"],["
§

impl StructuralPartialEq for CuDuration

","StructuralPartialEq","cu29::prelude::CuTime"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() -//{"start":55,"fragment_lengths":[46461]} \ No newline at end of file +//{"start":55,"fragment_lengths":[46462]} \ No newline at end of file diff --git a/type.impl/cu29_clock/struct.CuDuration.js b/type.impl/cu29_clock/struct.CuDuration.js index c86118a61..32804621f 100644 --- a/type.impl/cu29_clock/struct.CuDuration.js +++ b/type.impl/cu29_clock/struct.CuDuration.js @@ -1,9 +1,9 @@ (function() { - var type_impls = Object.fromEntries([["cu29_clock",[["
Source§

impl Add for CuDuration

Source§

type Output = CuDuration

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
","Add","cu29_clock::CuTime"],["
Source§

impl AddAssign for CuDuration

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
","AddAssign","cu29_clock::CuTime"],["
Source§

impl<'de> BorrowDecode<'de> for CuDuration

Source§

fn borrow_decode<D: BorrowDecoder<'de>>(\n decoder: &mut D,\n) -> Result<Self, DecodeError>

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29_clock::CuTime"],["
Source§

impl Clone for CuDuration

Source§

fn clone(&self) -> CuDuration

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","cu29_clock::CuTime"],["
Source§

impl CuDuration

Source

pub const MIN: CuDuration

Source

pub const MAX: CuDuration

Source

pub fn max(&self, p0: CuDuration) -> CuDuration

Source

pub fn min(&self, p0: CuDuration) -> CuDuration

Source

pub fn as_nanos(&self) -> u64

",0,"cu29_clock::CuTime"],["
Source§

impl Debug for CuDuration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","cu29_clock::CuTime"],["
Source§

impl Decode for CuDuration

Source§

fn decode<D: Decoder>(decoder: &mut D) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
","Decode","cu29_clock::CuTime"],["
Source§

impl Default for CuDuration

Source§

fn default() -> CuDuration

Returns the “default value” for a type. Read more
","Default","cu29_clock::CuTime"],["
Source§

impl<'de> Deserialize<'de> for CuDuration

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29_clock::CuTime"],["
Source§

impl Display for CuDuration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Display","cu29_clock::CuTime"],["
Source§

impl<T> Div<T> for CuDuration
where\n T: Into<u64>,

Source§

type Output = CuDuration

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self

Performs the / operation. Read more
","Div","cu29_clock::CuTime"],["
Source§

impl Encode for CuDuration

Source§

fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), EncodeError>

Encode a given type.
","Encode","cu29_clock::CuTime"],["
Source§

impl From<Duration> for CuDuration

bridge the API with standard Durations.

\n
Source§

fn from(duration: Duration) -> Self

Converts to this type from the input type.
","From","cu29_clock::CuTime"],["
Source§

impl From<u64> for CuDuration

Source§

fn from(duration: u64) -> Self

Converts to this type from the input type.
","From","cu29_clock::CuTime"],["
Source§

impl<T> Mul<T> for CuDuration
where\n T: Into<u64>,

Source§

type Output = CuDuration

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> CuDuration

Performs the * operation. Read more
","Mul","cu29_clock::CuTime"],["
Source§

impl Ord for CuDuration

Source§

fn cmp(&self, other: &CuDuration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29_clock::CuTime"],["
Source§

impl PartialEq for CuDuration

Source§

fn eq(&self, other: &CuDuration) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29_clock::CuTime"],["
Source§

impl PartialOrd for CuDuration

Source§

fn partial_cmp(&self, other: &CuDuration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29_clock::CuTime"],["
Source§

impl Serialize for CuDuration

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where\n __S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29_clock::CuTime"],["
Source§

impl Sub for CuDuration

Source§

type Output = CuDuration

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
","Sub","cu29_clock::CuTime"],["
Source§

impl SubAssign for CuDuration

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
","SubAssign","cu29_clock::CuTime"],["
Source§

impl Copy for CuDuration

","Copy","cu29_clock::CuTime"],["
Source§

impl Eq for CuDuration

","Eq","cu29_clock::CuTime"],["
Source§

impl StructuralPartialEq for CuDuration

","StructuralPartialEq","cu29_clock::CuTime"]]]]); + var type_impls = Object.fromEntries([["cu29_clock",[["
Source§

impl Add for CuDuration

Source§

type Output = CuDuration

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
","Add","cu29_clock::CuTime"],["
Source§

impl AddAssign for CuDuration

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
","AddAssign","cu29_clock::CuTime"],["
Source§

impl<'de> BorrowDecode<'de> for CuDuration

Source§

fn borrow_decode<D: BorrowDecoder<'de>>(\n decoder: &mut D,\n) -> Result<Self, DecodeError>

Attempt to decode this type with the given BorrowDecode.
","BorrowDecode<'de>","cu29_clock::CuTime"],["
Source§

impl Clone for CuDuration

Source§

fn clone(&self) -> CuDuration

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","cu29_clock::CuTime"],["
Source§

impl CuDuration

Source

pub const MIN: CuDuration

Source

pub const MAX: CuDuration

Source

pub fn max(&self, p0: CuDuration) -> CuDuration

Source

pub fn min(&self, p0: CuDuration) -> CuDuration

Source

pub fn as_nanos(&self) -> u64

",0,"cu29_clock::CuTime"],["
Source§

impl Debug for CuDuration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","cu29_clock::CuTime"],["
Source§

impl Decode for CuDuration

Source§

fn decode<D: Decoder>(decoder: &mut D) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
","Decode","cu29_clock::CuTime"],["
Source§

impl Default for CuDuration

Source§

fn default() -> CuDuration

Returns the “default value” for a type. Read more
","Default","cu29_clock::CuTime"],["
Source§

impl<'de> Deserialize<'de> for CuDuration

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","cu29_clock::CuTime"],["
Source§

impl Display for CuDuration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Display","cu29_clock::CuTime"],["
Source§

impl<T> Div<T> for CuDuration
where\n T: Into<u64>,

Source§

type Output = CuDuration

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self

Performs the / operation. Read more
","Div","cu29_clock::CuTime"],["
Source§

impl Encode for CuDuration

Source§

fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), EncodeError>

Encode a given type.
","Encode","cu29_clock::CuTime"],["
Source§

impl From<Duration> for CuDuration

bridge the API with standard Durations.

\n
Source§

fn from(duration: Duration) -> Self

Converts to this type from the input type.
","From","cu29_clock::CuTime"],["
Source§

impl From<u64> for CuDuration

Source§

fn from(duration: u64) -> Self

Converts to this type from the input type.
","From","cu29_clock::CuTime"],["
Source§

impl<T> Mul<T> for CuDuration
where\n T: Into<u64>,

Source§

type Output = CuDuration

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> CuDuration

Performs the * operation. Read more
","Mul","cu29_clock::CuTime"],["
Source§

impl Ord for CuDuration

Source§

fn cmp(&self, other: &CuDuration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized,

Restrict a value to a certain interval. Read more
","Ord","cu29_clock::CuTime"],["
Source§

impl PartialEq for CuDuration

Source§

fn eq(&self, other: &CuDuration) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","cu29_clock::CuTime"],["
Source§

impl PartialOrd for CuDuration

Source§

fn partial_cmp(&self, other: &CuDuration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","cu29_clock::CuTime"],["
Source§

impl Serialize for CuDuration

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where\n __S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","cu29_clock::CuTime"],["
Source§

impl Sub for CuDuration

Source§

type Output = CuDuration

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
","Sub","cu29_clock::CuTime"],["
Source§

impl SubAssign for CuDuration

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
","SubAssign","cu29_clock::CuTime"],["
Source§

impl Copy for CuDuration

","Copy","cu29_clock::CuTime"],["
Source§

impl Eq for CuDuration

","Eq","cu29_clock::CuTime"],["
Source§

impl StructuralPartialEq for CuDuration

","StructuralPartialEq","cu29_clock::CuTime"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() -//{"start":55,"fragment_lengths":[47508]} \ No newline at end of file +//{"start":55,"fragment_lengths":[47509]} \ No newline at end of file