#[non_exhaustive]pub enum DaemonReply {
Result(Result<(), String>),
NextEvents(Vec<Timestamped<NodeEvent>>),
NodeConfig {
result: Result<NodeConfig, String>,
},
ExtensionValue {
value: Option<Vec<u8>>,
},
Empty,
ExtensionReply {
payload: Vec<u8>,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Result(Result<(), String>)
NextEvents(Vec<Timestamped<NodeEvent>>)
NodeConfig
Fields
result: Result<NodeConfig, String>ExtensionValue
Reply to [DaemonRequest::ExtensionLoad]. None means the key is not
in the table — either never stored, or already dropped.
Empty
ExtensionReply
Opaque reply to crate::node_to_daemon::DaemonRequest::ExtensionRequest,
produced by the extension’s daemon half. dora does not interpret it.
Appended last so existing variants keep their postcard indices: the Python node API ships separately (PyPI) from the daemon, so a mixed-version pair must not misdecode older replies.
Implementations§
Source§impl DaemonReply
impl DaemonReply
Sourcepub fn encode_size_hint(&self) -> usize
pub fn encode_size_hint(&self) -> usize
Bulk bytes this reply will contribute to its encoding, for
crate::encode_presized.
NextEvents is a batch, so this sums the per-event hints rather than
relying on the single flat envelope allowance encode_presized adds:
the daemon drains up to NODE_EVENT_CHANNEL_CAPACITY events into one
reply, and a batch of a few dozen would otherwise realloc several times
on envelopes alone.
Trait Implementations§
Source§impl Clone for DaemonReply
impl Clone for DaemonReply
Source§fn clone(&self) -> DaemonReply
fn clone(&self) -> DaemonReply
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more