pub struct SchemaPayload {
pub schemas: Vec<Schema>,
pub root: TypeRef,
}Expand description
CBOR-encoded payload inside a schema wire message. A struct so new fields can be added without breaking the wire format.
Fields§
§schemas: Vec<Schema>All schemas we’re sending over. Sending the schema twice is a protocol error: peers must bail out.
root: TypeRefHash of the schema of the type corresponding to this method.
When attached to RequestCall, this is the args tuple, e.g.
for add(a: u32, b: u32) -> u64 it’s (u32, u32).
For RequestResponse it’s u64 in thea bove example.
Implementations§
Source§impl SchemaPayload
impl SchemaPayload
Sourcepub fn to_cbor(&self) -> CborPayload
pub fn to_cbor(&self) -> CborPayload
CBOR-encode this prepared message for embedding in RequestCall/RequestResponse.
Trait Implementations§
Source§impl Clone for SchemaPayload
impl Clone for SchemaPayload
Source§fn clone(&self) -> SchemaPayload
fn clone(&self) -> SchemaPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchemaPayload
impl Debug for SchemaPayload
Auto Trait Implementations§
impl Freeze for SchemaPayload
impl RefUnwindSafe for SchemaPayload
impl Send for SchemaPayload
impl Sync for SchemaPayload
impl Unpin for SchemaPayload
impl UnsafeUnpin for SchemaPayload
impl UnwindSafe for SchemaPayload
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