feat: add nodata

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-11-17 22:25:23 +01:00
parent 4d150febc7
commit 58c27e429b
13 changed files with 2657 additions and 810 deletions

View File

@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Envelope {

View File

@@ -32,8 +32,8 @@ pub mod capnp {
envelope.set_content(content);
let mut metadata = envelope.init_metadata();
metadata.set_domain(domain);
metadata.set_entity(entity);
metadata.set_domain(domain.into());
metadata.set_entity(entity.into());
serialize::write_message_to_words(&builder)
}
@@ -56,11 +56,13 @@ pub mod capnp {
domain: metadata
.get_domain()
.map_err(EnvelopeError::CapnpError)?
.to_string(),
.to_string()
.expect("message to be utf8"),
entity: metadata
.get_entity()
.map_err(EnvelopeError::CapnpError)?
.to_string(),
.to_string()
.expect("message to be utf8"),
},
))
}