[][src]Struct rttp_client::types::RoUrl

pub struct RoUrl { /* fields omitted */ }

Url builder

Examples

let rourl = RoUrl::with("http://httpbin.org")
  .path("get")
  .para("name=value")
  .para("name=value&name=value")
  .para(("name", "value", "name=value&name=value"))
  .para(Para::new("name", "value"));

Methods

impl RoUrl[src]

pub fn with<S: AsRef<str>>(url: S) -> RoUrl[src]

Create a rourl

Examples

use rttp_client::types::RoUrl;
RoUrl::with("http://httpbin.org/get");

pub fn fragment<S: AsRef<str>>(&mut self, fragment: S) -> &mut Self[src]

Set fragment to url

pub fn username<S: AsRef<str>>(&mut self, username: S) -> &mut Self[src]

Set username

pub fn password<S: AsRef<str>>(&mut self, password: S) -> &mut Self[src]

Set password

pub fn path<S: AsRef<str>>(&mut self, path: S) -> &mut Self[src]

Add path to url

pub fn para<P: IntoPara>(&mut self, para: P) -> &mut Self[src]

Add para to url

pub fn paras(&mut self, paras: Vec<Para>) -> &mut Self[src]

Set paras fo rurl

pub fn traditional(&mut self, traditional: bool) -> &mut Self[src]

Set is traditional

Trait Implementations

impl ToRoUrl for RoUrl[src]

impl ToUrl for RoUrl[src]

impl AsRef<RoUrl> for RoUrl[src]

impl From<Url> for RoUrl[src]

impl Clone for RoUrl[src]

impl Debug for RoUrl[src]

Auto Trait Implementations

impl Send for RoUrl

impl Sync for RoUrl

impl Unpin for RoUrl

impl UnwindSafe for RoUrl

impl RefUnwindSafe for RoUrl

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,