[−][src]Struct libvplan::client::Client
A client to retrieve a vplan.
Example
ⓘThis example is not tested
extern crate chrono; extern crate futures; extern crate libvplan; extern crate tokio; use chrono::Weekday; use libvplan::Client; use tokio::runtime::Runtime; let client = Client::new("username", "password"); let future = client.get_vplan(Weekday::Mon); let mut rt = match Runtime::new() { Ok(rt) => rt, Err(error) => panic!(error) }; let result = rt.block_on(future); println!("{:#?}", result);
Methods
impl Client
[src]
pub fn new(url: &str) -> Self
[src]
Creates a new client for the given url.
pub fn with_auth(url: &str, authorization: &str) -> Self
[src]
Creates a new client via a preformatted HTTP Basic authentication string (base64 "username:password").
pub fn with_credentials(url: &str, username: &str, password: &str) -> Self
[src]
Creates a new client with username and password for HTTP Basic authentication.
pub fn get(&self, day: Weekday) -> ResponseFuture
[src]
Retrieves the timetable change for the given day
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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,
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, 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.
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>,