pub struct SignedMessageBody {
pub content: String,
pub time_stamp: SystemTime,
pub salt: i64,
pub last_seen: LastSeen,
}Expand description
The body of a signed message containing content and metadata.
Equivalent to SignedMessageBody in Minecraft.
Fields§
§content: StringThe message content (max 256 UTF-8 chars)
time_stamp: SystemTimeWhen the message was created
salt: i64Random salt for uniqueness
last_seen: LastSeenPreviously seen message signatures
Implementations§
Source§impl SignedMessageBody
impl SignedMessageBody
Sourcepub const fn new(
content: String,
time_stamp: SystemTime,
salt: i64,
last_seen: LastSeen,
) -> Self
pub const fn new( content: String, time_stamp: SystemTime, salt: i64, last_seen: LastSeen, ) -> Self
Creates a new signed message body
Sourcepub fn unsigned(content: String) -> Self
pub fn unsigned(content: String) -> Self
Creates an unsigned message body (salt = 0, no last seen)
Sourcepub fn update_signature(
&self,
output: &mut dyn SignatureOutput,
) -> Result<(), CryptError>
pub fn update_signature( &self, output: &mut dyn SignatureOutput, ) -> Result<(), CryptError>
Updates signature data with this body’s information
Trait Implementations§
Source§impl Clone for SignedMessageBody
impl Clone for SignedMessageBody
Source§fn clone(&self) -> SignedMessageBody
fn clone(&self) -> SignedMessageBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SignedMessageBody
impl RefUnwindSafe for SignedMessageBody
impl Send for SignedMessageBody
impl Sync for SignedMessageBody
impl Unpin for SignedMessageBody
impl UnsafeUnpin for SignedMessageBody
impl UnwindSafe for SignedMessageBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>