Skip to main content

DialOut

Struct DialOut 

Source
pub struct DialOut {
    pub url: String,
    pub key: PathBuf,
    pub agent: String,
    pub mount: Option<String>,
    pub trust: Option<String>,
    pub backoff: Backoff,
    pub timeout: Duration,
    pub insecure_ws: bool,
    pub tls_roots: Option<PathBuf>,
}
Expand description

Where a service dials out to, as whom, and under what name it asks to be mounted.

Fields§

§url: String

The relay’s socket: ws://HOST:PORT/ws (wss:// with child-wss).

§key: PathBuf

The key file the upgrade’s proof is signed with (spec/00): synapse’s ~/.plexus/keys/<name>.key, 0600. Read at each dial, never kept.

§agent: String

The proof’s agent id.

§mount: Option<String>

The mount name asked for (peers.<mount>); none: the activation’s namespace.

§trust: Option<String>

The relay’s key (key:<64 hex>), pinned (spec/14 rule 4). KEEL-8: required — none, and the dial-out is refused before dialing. At each connect the relay proves it at _info (the nonce signed, as a mount’s child proves its key, DYNAUTH-5); a relay that proves none, or another, is refused and nothing it sends is served. A hop is believed only when it names this key as the service acting.

§backoff: Backoff

Dialing again after the socket drops.

§timeout: Duration

_info, the offer’s answer, and each of this side’s calls’ opens.

§insecure_ws: bool

KEEL-7: dial plain ws:// beyond loopback (transport.insecure_ws, a test network’s). Off: such a relay is refused before a socket opens (check_ws_url); on: dialed, and DialState::Mounted says insecure.

§tls_roots: Option<PathBuf>

KEEL-8 (DYNAUTH-8): a PEM file of certificate authorities a wss:// relay’s certificate may chain to, beside the webpki roots — as a mount’s ChildOptions::tls_roots.

Implementations§

Source§

impl DialOut

Source

pub fn new(url: impl Into<String>, key: impl Into<PathBuf>) -> Self

Dial url, signed in with the key in key.

Source

pub fn mount(self, name: impl Into<String>) -> Self

Ask to be mounted as name.

Source

pub fn trust(self, principal: impl Into<String>) -> Self

The relay’s key (key:<64 hex>): it must prove it at each connect, and hops are believed only from it (pinned).

Source

pub fn agent(self, agent: impl Into<String>) -> Self

The proof’s agent id.

Source

pub fn insecure_ws(self, on: bool) -> Self

KEEL-7: allow plain ws:// beyond loopback (DialOut::insecure_ws).

Source

pub fn tls_roots(self, roots: impl Into<PathBuf>) -> Self

KEEL-8: a PEM file of CAs a wss:// relay may chain to (DialOut::tls_roots).

Source

pub fn configured(self, c: &Config) -> Self

KEEL-7: DialOut::insecure_ws as transport.insecure_ws in c says, when it says more than its default; KEEL-8: and DialOut::tls_roots as transport.tls_roots says.

Trait Implementations§

Source§

impl Clone for DialOut

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DialOut

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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<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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more