pub struct Connection {
pub endpoint: Option<String>,
pub token: Option<ValueSource>,
}Expand description
A host named on argv, or the local one to go find.
Fields§
§endpoint: Option<String>--endpoint-url, else AFHTTP_ENDPOINT_URL, else discovery.
token: Option<ValueSource>--token-secret, else AFHTTP_TOKEN_SECRET, else whatever the
discovered host says its token is.
Implementations§
Source§impl Connection
impl Connection
pub fn new(endpoint: Option<String>, token: Option<ValueSource>) -> Self
Sourcepub fn is_explicit(&self) -> bool
pub fn is_explicit(&self) -> bool
Whether the caller named the host, as opposed to it being discovered. A recommended follow-up command repeats the first and omits the second, so the next run rediscovers rather than pinning a container’s address.
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Connection
impl Debug for Connection
Source§impl Default for Connection
impl Default for Connection
Source§fn default() -> Connection
fn default() -> Connection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe for Connection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more