Skip to main content

SafeHouseRun

Trait SafeHouseRun 

Source
pub trait SafeHouseRun: Send + Sync {
Show 14 methods // Required methods fn info(&self) -> Result<Value, ProviderError>; fn changes(&self) -> Result<Value, ProviderError>; fn finish(&self) -> Result<Value, ProviderError>; // Provided methods fn checkpoint(&self, spec: &Value) -> Result<Value, ProviderError> { ... } fn diff(&self, bytes: u64) -> Result<Value, ProviderError> { ... } fn exports(&self) -> Result<Value, ProviderError> { ... } fn discard(&self) -> Result<(), ProviderError> { ... } fn into_object(self) -> Object<dyn SafeHouseRun> where Self: Sized + Send + 'static { ... } fn info_in(&self, alloc: Alloc) -> Result<Value, ProviderError> { ... } fn changes_in(&self, alloc: Alloc) -> Result<Value, ProviderError> { ... } fn finish_in(&self, alloc: Alloc) -> Result<Value, ProviderError> { ... } fn checkpoint_in( &self, spec: &Value, alloc: Alloc, ) -> Result<Value, ProviderError> { ... } fn diff_in(&self, bytes: u64, alloc: Alloc) -> Result<Value, ProviderError> { ... } fn exports_in(&self, alloc: Alloc) -> Result<Value, ProviderError> { ... }
}
Expand description

One Mission’s safe house. Every slot takes &self.

Required Methods§

Source

fn info(&self) -> Result<Value, ProviderError>

Answers a SafeHouseInfo as a value.

Source

fn changes(&self) -> Result<Value, ProviderError>

Answers a ChangeLog as a value: the changes since the base, newest first. Empty when the provider has no history.

Source

fn finish(&self) -> Result<Value, ProviderError>

Removes an untouched isolated safe house and retains one that holds work; answers a SafeHouseReport as a value. Idempotent; a safe house in place is left alone.

Provided Methods§

Source

fn checkpoint(&self, spec: &Value) -> Result<Value, ProviderError>

Saves the work so far where another Station can fetch it, as spec (a CheckpointSpec as a value) says, without touching the working directory, and answers a SafeHouseCheckpoint as a value. Unsupported unless the provider has it.

Source

fn diff(&self, bytes: u64) -> Result<Value, ProviderError>

Answers a SafeHouseDiff as a value: the change since the base, at most bytes of it. Unsupported unless the provider has history.

Source

fn exports(&self) -> Result<Value, ProviderError>

Answers a SafeHouseExports as a value: what of the work exists only here. Unsupported unless the provider can tell; a caller then treats all of it as unexported.

Source

fn discard(&self) -> Result<(), ProviderError>

Removes an isolated safe house whatever it holds: its working directory and, for a version-control provider, the Mission’s branch. A safe house in place is refused. Unsupported unless the provider has it.

Source

fn into_object(self) -> Object<dyn SafeHouseRun>
where Self: Sized + Send + 'static,

This implementation as a handle: boxed beside its table, destroyed when the handle is dropped.

Source

fn info_in(&self, alloc: Alloc) -> Result<Value, ProviderError>

info, its answer built through alloc.

What a call through the kind’s table runs, naming the allocator the caller wants the answer in. Build the answer there, with the _in forms, and it crosses without a copy. The default answers the method itself, which the caller then copies into alloc.

Source

fn changes_in(&self, alloc: Alloc) -> Result<Value, ProviderError>

changes, its answer built through alloc.

What a call through the kind’s table runs, naming the allocator the caller wants the answer in. Build the answer there, with the _in forms, and it crosses without a copy. The default answers the method itself, which the caller then copies into alloc.

Source

fn finish_in(&self, alloc: Alloc) -> Result<Value, ProviderError>

finish, its answer built through alloc.

What a call through the kind’s table runs, naming the allocator the caller wants the answer in. Build the answer there, with the _in forms, and it crosses without a copy. The default answers the method itself, which the caller then copies into alloc.

Source

fn checkpoint_in( &self, spec: &Value, alloc: Alloc, ) -> Result<Value, ProviderError>

checkpoint, its answer built through alloc.

What a call through the kind’s table runs, naming the allocator the caller wants the answer in. Build the answer there, with the _in forms, and it crosses without a copy. The default answers the method itself, which the caller then copies into alloc.

Source

fn diff_in(&self, bytes: u64, alloc: Alloc) -> Result<Value, ProviderError>

diff, its answer built through alloc.

What a call through the kind’s table runs, naming the allocator the caller wants the answer in. Build the answer there, with the _in forms, and it crosses without a copy. The default answers the method itself, which the caller then copies into alloc.

Source

fn exports_in(&self, alloc: Alloc) -> Result<Value, ProviderError>

exports, its answer built through alloc.

What a call through the kind’s table runs, naming the allocator the caller wants the answer in. Build the answer there, with the _in forms, and it crosses without a copy. The default answers the method itself, which the caller then copies into alloc.

Trait Implementations§

Source§

impl From<Remote<dyn SafeHouseRun>> for Box<dyn SafeHouseRun>

Source§

fn from(remote: Remote<dyn SafeHouseRun>) -> Self

Converts to this type from the input type.
Source§

impl Kind for dyn SafeHouseRun

Source§

const NAME: &'static str = "ai6_safehouse_run"

The kind’s name in a descriptor’s kinds and tables.
Source§

const FLOOR: usize

The size of [Kind::Vtable]: every slot. A table declaring less is refused; a larger one has slots appended after these.
Source§

const FLOOR_HASH: u32 = SafeHouseRunVtable::FLOOR_HASH

FNV-1a over the shape and every method’s name and normalised signature, in table order. A table carrying another number was built from a different declaration of this kind. Read more
Source§

const REQUIRED: &'static [(&'static str, usize)]

Every required slot as (method name, one past its end), so a null one is refused by name.
Source§

const OBJECT: bool = true

Whether this is an object kind (#[guatiao::kind(object)]): a handle one caller owns, with a destroy slot first and &mut self methods, never offered by a registry. See [Object]. Read more
Source§

type Vtable = SafeHouseRunVtable

The repr(C) table, which starts with a [KindHeader].
Source§

fn as_dyn(remote: &Remote<Self>) -> &Self

The trait object over a proxy. The macro writes remote, because only it knows the trait.
Source§

fn as_dyn_mut(remote: &mut Remote<Self>) -> &mut Self

The same, mutably — what an [Object] hands out.
Source§

fn boxed(remote: Remote<Self>) -> Box<Self>

The same, boxed.
Source§

fn shared(remote: Remote<Self>) -> Arc<Self> ⓘ

The same, shared.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SafeHouseRun for Remote<dyn SafeHouseRun>

Source§

fn info_in(&self, alloc: Alloc) -> Result<Value, ProviderError>

Source§

fn info(&self) -> Result<Value, ProviderError>

Source§

fn changes_in(&self, alloc: Alloc) -> Result<Value, ProviderError>

Source§

fn changes(&self) -> Result<Value, ProviderError>

Source§

fn finish_in(&self, alloc: Alloc) -> Result<Value, ProviderError>

Source§

fn finish(&self) -> Result<Value, ProviderError>

Source§

fn checkpoint_in( &self, spec: &Value, alloc: Alloc, ) -> Result<Value, ProviderError>

Source§

fn checkpoint(&self, spec: &Value) -> Result<Value, ProviderError>

Source§

fn diff_in(&self, bytes: u64, alloc: Alloc) -> Result<Value, ProviderError>

Source§

fn diff(&self, bytes: u64) -> Result<Value, ProviderError>

Source§

fn exports_in(&self, alloc: Alloc) -> Result<Value, ProviderError>

Source§

fn exports(&self) -> Result<Value, ProviderError>

Source§

fn discard(&self) -> Result<(), ProviderError>

Implementors§