udpate rust server samples

This commit is contained in:
William Cheng 2018-07-31 11:33:23 +08:00
parent 926b971497
commit 0c52fcd5ff
2 changed files with 11 additions and 0 deletions

View File

@ -43,6 +43,14 @@ use {Api,
}; };
use models; use models;
define_encode_set! {
/// This encode set is used for object IDs
///
/// Aside from the special characters defined in the `PATH_SEGMENT_ENCODE_SET`,
/// the vertical bar (|) is encoded.
pub ID_ENCODE_SET = [PATH_SEGMENT_ENCODE_SET] | {'|'}
}
/// Convert input into a base path, e.g. "http://example:123". Also checks the scheme as it goes. /// Convert input into a base path, e.g. "http://example:123". Also checks the scheme as it goes.
fn into_base_path(input: &str, correct_scheme: Option<&'static str>) -> Result<String, ClientInitError> { fn into_base_path(input: &str, correct_scheme: Option<&'static str>) -> Result<String, ClientInitError> {
// First convert to Uri, since a base path is a subset of Uri. // First convert to Uri, since a base path is a subset of Uri.

View File

@ -19,6 +19,9 @@ extern crate hyper;
extern crate swagger; extern crate swagger;
#[macro_use]
extern crate url;
use futures::Stream; use futures::Stream;
use std::io::Error; use std::io::Error;