[][src]Struct oas_gen::ApiPath

pub struct ApiPath {
    pub prefix: Option<String>,
    pub ids: Vec<ApiId>,
    pub token: Option<String>,
    // some fields omitted
}

Fields

prefix: Option<String>ids: Vec<ApiId>token: Option<String>

Implementations

impl ApiPath[src]

pub fn new(
    prefix: Option<String>,
    ids: Vec<ApiId>,
    token: Option<String>
) -> Self
[src]

</api/testdoc> is represented as @prefix:api and @token:testdoc. </api/user/8/testdoc> is represented as @prefix:api @ids: [('user','{user_key}')] and @token:testdoc.

Contracts

Pre-condition: ! prefix . clone() . unwrap_or_default() . starts_with('/')

Pre-condition: ! prefix . clone() . unwrap_or_default() . contains('{')

Pre-condition: ! prefix . clone() . unwrap_or_default() . contains('}')

Pre-condition: ! token . clone() . unwrap_or_default() . starts_with('/')

Pre-condition: ! token . clone() . unwrap_or_default() . contains('{')

Pre-condition: ! token . clone() . unwrap_or_default() . contains('}')

pub fn with_queries(
    prefix: Option<String>,
    ids: Vec<ApiId>,
    token: Option<String>,
    qpbuilders: Vec<QueryParamBuilder>
) -> Self
[src]

Adds query parameters to the url, otherwise same as new.

Contracts

Pre-condition: ! prefix . clone() . unwrap_or_default() . starts_with('/')

Pre-condition: ! prefix . clone() . unwrap_or_default() . contains('{')

Pre-condition: ! prefix . clone() . unwrap_or_default() . contains('}')

Pre-condition: ! token . clone() . unwrap_or_default() . starts_with('/')

Pre-condition: ! token . clone() . unwrap_or_default() . contains('{')

Pre-condition: ! token . clone() . unwrap_or_default() . contains('}')

Trait Implementations

impl Clone for ApiPath[src]

impl Debug for ApiPath[src]

impl Display for ApiPath[src]

Auto Trait Implementations

impl RefUnwindSafe for ApiPath

impl Send for ApiPath

impl Sync for ApiPath

impl Unpin for ApiPath

impl UnwindSafe for ApiPath

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.