1 parent e16b30d commit 29586b3Copy full SHA for 29586b3
1 file changed
dasp_graph/src/node/mod.rs
@@ -93,7 +93,7 @@ pub trait Node<W = ()> {
93
pub struct Input<W = ()> {
94
buffers_ptr: *const Buffer,
95
buffers_len: usize,
96
- pub edge_weight: W,
+ edge_weight: W,
97
}
98
99
impl<W> Input<W> {
@@ -115,6 +115,11 @@ impl<W> Input<W> {
115
// alive.
116
unsafe { std::slice::from_raw_parts(self.buffers_ptr, self.buffers_len) }
117
118
+
119
+ /// A reference to the input's edge weight.
120
+ pub fn edge_weight(&self) -> &W {
121
+ &self.edge_weight
122
+ }
123
124
125
// Inputs can only be created by the `dasp_graph::process` implementation and only ever live as
0 commit comments