pub enum Body<'a> {
Query {
method: &'a [u8],
arguments: Node<'a>,
},
ReadOnlyQuery {
method: &'a [u8],
arguments: Node<'a>,
},
Response(Node<'a>),
Error {
code: i64,
message: &'a [u8],
},
}Expand description
Constructor input for standard envelopes. Use raw nodes for additional query/response fields; the same semantic validation applies as on receive.
Variants§
Query
ReadOnlyQuery
BEP 43 query from a node that must not be added to routing tables.
Response(Node<'a>)
Error
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Body<'a>
impl<'a> RefUnwindSafe for Body<'a>
impl<'a> Send for Body<'a>
impl<'a> Sync for Body<'a>
impl<'a> Unpin for Body<'a>
impl<'a> UnsafeUnpin for Body<'a>
impl<'a> UnwindSafe for Body<'a>
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