pub struct DiscoveryPage<'a> {
pub total: u16,
pub offset: u16,
pub entries: &'a [u8],
}Expand description
Response payload for a paged Command Discovery Protocol response.
entries carries a raw postcard sequence: varint(count) ++ DiscoveryEntry × count.
The host iterates pages until offset + count_this_page >= total.
Fields§
§total: u16Total number of registered commands (across all pages).
offset: u16Offset this page starts at (echoes the request’s offset field).
entries: &'a [u8]Serialized varint(count) ++ DiscoveryEntry × count for entries in
this page. Opaque to this crate; parse with postcard::take_from_bytes.
Trait Implementations§
Source§impl<'a> Clone for DiscoveryPage<'a>
impl<'a> Clone for DiscoveryPage<'a>
Source§fn clone(&self) -> DiscoveryPage<'a>
fn clone(&self) -> DiscoveryPage<'a>
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<'a> Debug for DiscoveryPage<'a>
impl<'a> Debug for DiscoveryPage<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for DiscoveryPage<'a>
impl<'de: 'a, 'a> Deserialize<'de> for DiscoveryPage<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for DiscoveryPage<'a>
impl<'a> RefUnwindSafe for DiscoveryPage<'a>
impl<'a> Send for DiscoveryPage<'a>
impl<'a> Sync for DiscoveryPage<'a>
impl<'a> Unpin for DiscoveryPage<'a>
impl<'a> UnsafeUnpin for DiscoveryPage<'a>
impl<'a> UnwindSafe for DiscoveryPage<'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