Struct rtj::Header [−][src]
pub struct Header {
pub msgtype: u8,
pub psize: u32,
pub pubkey: [u8; 32],
pub nonce: [u8; 24],
pub encrypted: bool,
}
Expand description
Header
contains identifying information about the Job
that follows.
Specifically this contains the fields:
- msgtype, the
Job
type:u8
- psize, the following payload size in bytes as:
u32
- pubkey, the crypto-box pubkey of the sender as:
[u8; 32]
- nonce, the message nonce as:
[u8; 24]
- encrypted,
bool
indicating the encryption status of the following payload.
Fields
msgtype: u8
psize: u32
pubkey: [u8; 32]
nonce: [u8; 24]
encrypted: bool
Implementations
Sets the value of msgtype
.
Sets the value of nonce
by generating one using the specified csprng.
Sets the value of encrypted
.
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
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Header
impl UnwindSafe for Header
Blanket Implementations
Mutably borrows from an owned value. Read more