Skip to main content

Reaching

Struct Reaching 

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

One host, reached through a broker.

Implementations§

Source§

impl Reaching

Source

pub fn new(session: Arc<Session>, host: Host) -> Self

A host that will be connected to through this session when somebody needs it.

Source

pub fn host(&self) -> &Host

The name this reaches.

Source

pub fn offering( &self, artifact: Artifact, runtime: impl Into<String>, ) -> Result<(), TransportError>

Tells it what to provision the far side with, before the first job.

Staged if the wire is not open yet, handed straight over if it is — and either way the far side only receives it if it asks, because the wire announces an artifact’s name and sends the bytes on request.

Trait Implementations§

Source§

impl Drop for Reaching

Source§

fn drop(&mut self)

Lets the rendezvous go, so that no client has to remember to.

Only one that was taken: a handle nobody sent work to never held anything. Nothing fails if this does not arrive, which is why the failure is swallowed — a run that finished is not a run to report an error from.

Source§

impl Transport for Reaching

Source§

fn dispatch( &self, plan: &Plan, cargo: &Cargo<'_>, seen: Option<&dyn Watcher>, ) -> Result<Outcome, TransportError>

The connection on the first call, and after that this is the wire’s dispatch with one Arc clone in front of it.

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<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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.