More general type aliases

This commit is contained in:
Daniel Sanchez Quiros 2022-09-28 16:47:34 +02:00
parent da3596e8f1
commit be030f2a1f

View File

@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize};
pub type PubsubTopic = String; pub type PubsubTopic = String;
pub type ContentTopic = String; pub type ContentTopic = String;
pub type WakuMessageVersion = usize;
/// JsonResponse wrapper. /// JsonResponse wrapper.
/// `go-waku` ffi returns this type as a `char *` as per the [specification](https://rfc.vac.dev/spec/36/#jsonresponse-type) /// `go-waku` ffi returns this type as a `char *` as per the [specification](https://rfc.vac.dev/spec/36/#jsonresponse-type)
@ -38,7 +39,7 @@ pub struct WakuMessage {
/// The content topic to be set on the message /// The content topic to be set on the message
content_topic: ContentTopic, content_topic: ContentTopic,
/// The Waku Message version number /// The Waku Message version number
version: usize, version: WakuMessageVersion,
/// Unix timestamp in nanoseconds /// Unix timestamp in nanoseconds
timestamp: usize, timestamp: usize,
} }