pub struct CommandQuery {
pub tid: u16,
pub command: usize,
pub peer: Peer,
pub target: IdBytes,
pub value: Option<Vec<u8>>,
}Expand description
Represents an incoming query with a custom command.
Fields§
§tid: u16The Id of the query
command: usizeCommand def
peer: Peerthe node who sent the query
target: IdBytesthe query target (32 byte target)
value: Option<Vec<u8>>the query payload decoded with the inputEncoding
Implementations§
Source§impl CommandQuery
impl CommandQuery
pub fn into_response_with_error( self, err: impl Into<usize>, ) -> CommandQueryResponse
Trait Implementations§
Source§impl Clone for CommandQuery
impl Clone for CommandQuery
Source§fn clone(&self) -> CommandQuery
fn clone(&self) -> CommandQuery
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 moreSource§impl Debug for CommandQuery
impl Debug for CommandQuery
Source§impl From<CommandQuery> for CommandQueryResponse
impl From<CommandQuery> for CommandQueryResponse
Source§fn from(q: CommandQuery) -> Self
fn from(q: CommandQuery) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CommandQuery
impl RefUnwindSafe for CommandQuery
impl Send for CommandQuery
impl Sync for CommandQuery
impl Unpin for CommandQuery
impl UnsafeUnpin for CommandQuery
impl UnwindSafe for CommandQuery
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