pub enum HostOrigin {
Flag,
Environment,
Default,
LinkedWorktree,
}Expand description
Where the interface a local server binds came from.
use majordomus_cli::cli::{resolve_http_host, HostOrigin};
// only an address the environment supplied is announced in the log as the variable's
assert_eq!(resolve_http_host(None, Some("0.0.0.0")).1, HostOrigin::Environment);
assert_ne!(HostOrigin::Flag, HostOrigin::Default);Variants§
Flag
--host or --http-host on this command line.
Environment
HTTP_HOST_ENV in this process’s environment.
Default
Neither: LOOPBACK_HOST.
LinkedWorktree
HTTP_HOST_ENV named one, and the checkout is a linked worktree, which does not
take it: LOOPBACK_HOST (checkout_http_host).
Trait Implementations§
Source§impl Clone for HostOrigin
impl Clone for HostOrigin
Source§fn clone(&self) -> HostOrigin
fn clone(&self) -> HostOrigin
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 moreimpl Copy for HostOrigin
Source§impl Debug for HostOrigin
impl Debug for HostOrigin
impl Eq for HostOrigin
Source§impl PartialEq for HostOrigin
impl PartialEq for HostOrigin
Source§fn eq(&self, other: &HostOrigin) -> bool
fn eq(&self, other: &HostOrigin) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HostOrigin
Auto Trait Implementations§
impl Freeze for HostOrigin
impl RefUnwindSafe for HostOrigin
impl Send for HostOrigin
impl Sync for HostOrigin
impl Unpin for HostOrigin
impl UnsafeUnpin for HostOrigin
impl UnwindSafe for HostOrigin
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.