#[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§impl Debug for DaemonReply
impl Debug for DaemonReply
Source§impl<'de> Deserialize<'de> for DaemonReply
impl<'de> Deserialize<'de> for DaemonReply
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DaemonReply
impl RefUnwindSafe for DaemonReply
impl Send for DaemonReply
impl Sync for DaemonReply
impl Unpin for DaemonReply
impl UnsafeUnpin for DaemonReply
impl UnwindSafe for DaemonReply
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more