pub struct AnswerContext { /* private fields */ }Expand description
What the decoder knows about the answers before it reads the first one.
Everything in it is a hint for sizing storage. An implementation may use it or ignore it - a struct with one field per question has nothing to size - and it never changes what is decoded or whether decoding succeeds.
Implementations§
Source§impl AnswerContext
impl AnswerContext
Sourcepub fn expected_answers(&self) -> usize
pub fn expected_answers(&self) -> usize
How many questions the request asked, and so how many answers a complete response carries, capped at the number of answers the body is long enough to hold. Zero when unknown.
It is a capacity hint: a response may carry fewer answers or more.
Trait Implementations§
Source§impl Clone for AnswerContext
impl Clone for AnswerContext
impl Copy for AnswerContext
Source§impl Debug for AnswerContext
impl Debug for AnswerContext
Source§impl Default for AnswerContext
impl Default for AnswerContext
impl Eq for AnswerContext
Source§impl Hash for AnswerContext
impl Hash for AnswerContext
Source§impl PartialEq for AnswerContext
impl PartialEq for AnswerContext
impl StructuralPartialEq for AnswerContext
Auto Trait Implementations§
impl Freeze for AnswerContext
impl RefUnwindSafe for AnswerContext
impl Send for AnswerContext
impl Sync for AnswerContext
impl Unpin for AnswerContext
impl UnsafeUnpin for AnswerContext
impl UnwindSafe for AnswerContext
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.