pub struct Message {
pub chain: ChainProof,
pub spaces: Vec<Bundle>,
}Expand description
A certificate message for verifying space ownership and handle bindings.
Contains a chain anchor, shared on-chain proofs, and per-space data. Multiple spaces can share the same chain proofs for efficient batching.
Fields§
§chain: ChainProofShared on-chain merkle proofs anchored to a specific block.
spaces: Vec<Bundle>Per-space records. Uniqueness enforced during verification.
Implementations§
Source§impl Message
impl Message
Sourcepub fn update(&mut self, updates: Vec<DataUpdateRequest>)
pub fn update(&mut self, updates: Vec<DataUpdateRequest>)
Update offchain data on an existing message.
Note: records passed here should already have Sig records appended. Construct a new message to update certificates.
Source§impl Message
impl Message
pub fn from_slice(bytes: &[u8]) -> Result<Message, Error>
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn set_delegate_records(&mut self, canonical: &SName, data: RecordSet)
pub fn set_records(&mut self, canonical: &SName, data: RecordSet)
pub fn try_from_certificates( chain: ChainProof, certs: Vec<Certificate>, ) -> Result<Message, MessageError>
Trait Implementations§
Source§impl BorshDeserialize for Message
impl BorshDeserialize for Message
fn deserialize_reader<R>(reader: &mut R) -> Result<Message, Error>where
R: Read,
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for Message
impl BorshSerialize for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 more