diff options
author | trinity-1686a <trinity@deuxfleurs.fr> | 2022-06-19 17:44:07 +0200 |
---|---|---|
committer | trinity-1686a <trinity@deuxfleurs.fr> | 2022-06-19 17:47:41 +0200 |
commit | 5d7541e13a4c3640f0dc8aead595b51775fc0ac8 (patch) | |
tree | acd4a068050d10cfaea27cb1ba08e03b9233e31d /src/util.rs | |
parent | 4745e7c4ba5665d3303ae567087781778cec9c34 (diff) | |
download | netapp-5d7541e13a4c3640f0dc8aead595b51775fc0ac8.tar.gz netapp-5d7541e13a4c3640f0dc8aead595b51775fc0ac8.zip |
wait for any ready stream instead of the highest priority one
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs index 02b4e7d..3ee0cb9 100644 --- a/src/util.rs +++ b/src/util.rs @@ -19,6 +19,14 @@ pub type NodeKey = sodiumoxide::crypto::sign::ed25519::SecretKey; /// A network key pub type NetworkKey = sodiumoxide::crypto::auth::Key; +/// A stream of associated data. +/// +/// The Stream can continue after receiving an error. +/// When sent through Netapp, the Vec may be split in smaller chunk in such a way +/// consecutive Vec may get merged, but Vec and error code may not be reordered +/// +/// The error code have no predefined meaning, it's up to you application to define their +/// semantic. pub type AssociatedStream = Pin<Box<dyn Stream<Item = Vec<u8>> + Send>>; /// Utility function: encodes any serializable value in MessagePack binary format |