Enum luk_chain::Data [−][src]
pub enum Data {
IndividualMessage(u128, Vec<u8>),
GroupMessage(String),
NewUser {
id: u128,
pub_key: RsaPublicKey,
},
}Expand description
Basic struct to show what can be stored on the [BlockChain]
Variants
Message to send to specific user. Data is encrypted
Message to be read by anyone
Tuple Fields of GroupMessage
0: StringAdds the creation of a new node to the [BlockChain]
Fields of NewUser
Trait Implementations
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Data
impl UnwindSafe for Data
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn from_stream<'life0, 'life1, 'async_trait, R: AsyncReadExt + Send + Unpin>(
stream: &'life0 mut R,
buffer: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
fn from_stream<'life0, 'life1, 'async_trait, R: AsyncReadExt + Send + Unpin>(
stream: &'life0 mut R,
buffer: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
Reads a [Message] from a raw stream of bytes, dealing with length prefixing.
type Output = T
type Output = T
Should always be Self