pub struct PeerRepeatersResponseView<'a> { /* private fields */ }Expand description
Interprets the body of a MacCommand::PeerRepeatersResponse: the page’s
own options, then the entries that follow the end marker.
Implementations§
Source§impl<'a> PeerRepeatersResponseView<'a>
impl<'a> PeerRepeatersResponseView<'a>
pub fn new(body: &'a [u8]) -> Self
Sourcepub fn nonce(&self) -> Option<u16>
pub fn nonce(&self) -> Option<u16>
The nonce copied from the request, present only when the request carried one.
Sourcepub fn cursor(&self) -> Option<&'a [u8]>
pub fn cursor(&self) -> Option<&'a [u8]>
The resume token for the next page. Absent on the final page, which is what ends an enumeration.
Sourcepub fn total(&self) -> Option<u8>
pub fn total(&self) -> Option<u8>
Entries in the whole list, not this page. Required on the response to a cursorless request and optional afterwards.
Sourcepub fn entries(&self) -> PeerRepeaterEntries<'a> ⓘ
pub fn entries(&self) -> PeerRepeaterEntries<'a> ⓘ
Walk the entries this page carries.
A malformed entry ends the walk rather than the page: everything decoded before it is still an answer.
Trait Implementations§
Source§impl<'a> Clone for PeerRepeatersResponseView<'a>
impl<'a> Clone for PeerRepeatersResponseView<'a>
Source§fn clone(&self) -> PeerRepeatersResponseView<'a>
fn clone(&self) -> PeerRepeatersResponseView<'a>
Returns a duplicate of the value. Read more
1.0.0§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 PeerRepeatersResponseView<'a>
impl<'a> Debug for PeerRepeatersResponseView<'a>
impl<'a> Copy for PeerRepeatersResponseView<'a>
Auto Trait Implementations§
impl<'a> Freeze for PeerRepeatersResponseView<'a>
impl<'a> RefUnwindSafe for PeerRepeatersResponseView<'a>
impl<'a> Send for PeerRepeatersResponseView<'a>
impl<'a> Sync for PeerRepeatersResponseView<'a>
impl<'a> Unpin for PeerRepeatersResponseView<'a>
impl<'a> UnwindSafe for PeerRepeatersResponseView<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)