[][src]Struct romad::base::Connection

pub struct Connection<'a> {
    pub address: &'a str,
    pub port: &'a str,
    pub token: Option<&'a str>,
    pub timeout: isize,
    pub version: &'a str,
}

Connection object Default values http://localhost:4646/v1

Fields

address: &'a strport: &'a strtoken: Option<&'a str>timeout: isizeversion: &'a str

Implementations

impl<'_> Connection<'_>[src]

pub fn build_base_url(&self) -> String[src]

Build the base url for the connection

use romad::base::Connection;

let con: Connection = Default::default();
let url = con.build_base_url();
assert_eq!("http://localhost:4646/v1".to_string(), url);

Trait Implementations

impl<'_> Default for Connection<'_>[src]

fn default() -> Self[src]

Default implementation for a localhost nomad instance

use romad::base::Connection;

let con: Connection = Default::default();

Auto Trait Implementations

impl<'a> RefUnwindSafe for Connection<'a>

impl<'a> Send for Connection<'a>

impl<'a> Sync for Connection<'a>

impl<'a> Unpin for Connection<'a>

impl<'a> UnwindSafe for Connection<'a>

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> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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