pub struct Response { /* private fields */ }Available on crate features
blocking-client or async-client only.Expand description
A representation of a complete fetch response
Implementations
sourceimpl Response
impl Response
sourcepub fn from_line_reader(
version: Protocol,
reader: &mut impl ExtendedBufRead
) -> Result<Response, Error>
Available on crate feature blocking-client only.
pub fn from_line_reader(
version: Protocol,
reader: &mut impl ExtendedBufRead
) -> Result<Response, Error>
blocking-client only.Parse a response of the given version of the protocol from reader.
sourceimpl Response
impl Response
sourcepub fn check_required_features(
version: Protocol,
features: &[Feature]
) -> Result<(), Error>
pub fn check_required_features(
version: Protocol,
features: &[Feature]
) -> Result<(), Error>
Return an error if the given features don’t contain the required ones for the given version of the protocol.
Even though technically any set of features supported by the server could work, we only implement the ones that make it easy to maintain all versions with a single code base that aims to be and remain maintainable.
sourcepub fn acknowledgements(&self) -> &[Acknowledgement]
pub fn acknowledgements(&self) -> &[Acknowledgement]
Return all acknowledgements parsed previously.
sourcepub fn shallow_updates(&self) -> &[ShallowUpdate]
pub fn shallow_updates(&self) -> &[ShallowUpdate]
Return all shallow update lines parsed previously.
sourcepub fn wanted_refs(&self) -> &[WantedRef]
pub fn wanted_refs(&self) -> &[WantedRef]
Return all wanted-refs parsed previously.
Auto Trait Implementations
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more