Struct anni_fetch::client::RequestBuilder [−][src]
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
impl RefUnwindSafe for RequestBuilder
impl Send for RequestBuilder
impl Sync for RequestBuilder
impl Unpin for RequestBuilder
impl UnwindSafe for RequestBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,