(
&mut self,
node: crate::types::GraphNode<NodeId>,
get_contents: F,
)
| 1111 | |
| 1112 | impl crate::output::traits::VertexBuffer for BoundedOutput { |
| 1113 | fn output_line<E, F>( |
| 1114 | &mut self, |
| 1115 | node: crate::types::GraphNode<NodeId>, |
| 1116 | get_contents: F, |
| 1117 | ) -> Result<(), E> |
| 1118 | where |
| 1119 | E: From<std::io::Error>, |
| 1120 | F: FnOnce(&mut [u8]) -> Result<(), E>, |
| 1121 | { |
| 1122 | // Check an emitted span before Writer allocates its scratch buffer. |
| 1123 | // This is a rendered-span check, never a change-payload size estimate. |
| 1124 | let sink = self.writer.inner_mut(); |
| 1125 | if node.len() > sink.max_bytes.saturating_sub(sink.bytes.len()) { |
| 1126 | return Err(sink.reject().into()); |
| 1127 | } |
| 1128 | self.writer.output_line(node, get_contents) |
| 1129 | } |
| 1130 | |
| 1131 | fn output_conflict_marker( |
| 1132 | &mut self, |
no test coverage detected