Skip to main content

Startup

Struct Startup 

Source
pub struct Startup { /* private fields */ }
Expand description

What to tell the reader about a daemon that has just come up.

Returned beside Bound rather than reachable through it, and that separation is load-bearing rather than tidy. Bound owns the Origin, and the Origin owns the TLS configuration, and that owns a private key — so a banner line reached through Bound is a string a static analyser must treat as derived from the key, and it said so: CodeQL flagged both eprintln!s in main as cleartext logging of the certificate resolver.

It was wrong about the values — these are host names and paths — and right about the shape. Handing the caller strings that were never near the key makes the question unanswerable rather than answered.

Implementations§

Source§

impl Startup

Source

pub fn routes(&self) -> &[String]

One line per alias, naming where it actually points.

Only available once bound, which is the point: an alias rooted at the home directory has no printable base until the remote has been asked.

Source

pub fn refused(&self) -> &[String]

Enabled hosts that would not connect, and what ssh said about each.

Separate from routes so a caller cannot print them as though they were working. Empty on an ordinary run; not an error, because the daemon is serving everything else.

Source

pub fn trust(&self) -> Option<&str>

What to say about the certificate, under https.

None under http, where there is nothing to trust. Under https there is always something to say, because nothing portable can tell whether the authority is still trusted — and a daemon that advertised https://... and said nothing else left a first-time reader at ERR_CERT_AUTHORITY_INVALID with no way to guess what to do. That was measured by following the banner on a machine that had never run this.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.