Struct anni_fetch::client::RequestBuilder[][src]

pub struct RequestBuilder { /* fields omitted */ }

Builder for pktline-based git request body

Implementations

impl RequestBuilder[src]

pub fn new(auto_packet: bool) -> Self[src]

Create a new RequestBuilder

If auto_packet is enabled, DelimeterPacket would be inserted when first you call [argument], and FlushPacket would be inserted at [build] time.

pub fn command(self, command: &str) -> Self[src]

Write command={command} to body

pub fn capability(self, name: &str, value: &[&str]) -> Self[src]

Write {name}={value_1} {value_2} {value_3} to body

pub fn argument(self, arg: &str) -> Self[src]

Write {arg} to body

pub fn packet(self, packet: Message) -> Self[src]

Write Message::Flush or Message::Delimeter to body

pub fn want(self, hash: &str) -> Self[src]

Write want {hash} to body

pub fn have(self, hash: &str) -> Self[src]

Write have {hash} to body

pub fn build(self) -> Vec<u8>[src]

Build RequestBuilder into Vec

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.