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§
Sourcefn info(&self) -> Result<Value, ProviderError>
fn info(&self) -> Result<Value, ProviderError>
Answers a SafeHouseInfo as a value.
Sourcefn changes(&self) -> Result<Value, ProviderError>
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.
Sourcefn finish(&self) -> Result<Value, ProviderError>
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§
Sourcefn checkpoint(&self, spec: &Value) -> Result<Value, ProviderError>
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.
Sourcefn diff(&self, bytes: u64) -> Result<Value, ProviderError>
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.
Sourcefn exports(&self) -> Result<Value, ProviderError>
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.
Sourcefn discard(&self) -> Result<(), ProviderError>
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.
Sourcefn into_object(self) -> Object<dyn SafeHouseRun>
fn into_object(self) -> Object<dyn SafeHouseRun>
This implementation as a handle: boxed beside its table, destroyed when the handle is dropped.
Sourcefn info_in(&self, alloc: Alloc) -> Result<Value, ProviderError>
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.
Sourcefn changes_in(&self, alloc: Alloc) -> Result<Value, ProviderError>
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.
Sourcefn finish_in(&self, alloc: Alloc) -> Result<Value, ProviderError>
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.
Sourcefn checkpoint_in(
&self,
spec: &Value,
alloc: Alloc,
) -> Result<Value, ProviderError>
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.
Sourcefn diff_in(&self, bytes: u64, alloc: Alloc) -> Result<Value, ProviderError>
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.
Sourcefn exports_in(&self, alloc: Alloc) -> Result<Value, ProviderError>
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>
impl From<Remote<dyn SafeHouseRun>> for Box<dyn SafeHouseRun>
Source§fn from(remote: Remote<dyn SafeHouseRun>) -> Self
fn from(remote: Remote<dyn SafeHouseRun>) -> Self
Source§impl Kind for dyn SafeHouseRun
impl Kind for dyn SafeHouseRun
Source§const NAME: &'static str = "ai6_safehouse_run"
const NAME: &'static str = "ai6_safehouse_run"
kinds and tables.Source§const FLOOR: usize
const FLOOR: usize
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
const FLOOR_HASH: u32 = SafeHouseRunVtable::FLOOR_HASH
Source§const REQUIRED: &'static [(&'static str, usize)]
const REQUIRED: &'static [(&'static str, usize)]
(method name, one past its end), so a
null one is refused by name.Source§const OBJECT: bool = true
const OBJECT: bool = true
#[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 moreSource§fn as_dyn(remote: &Remote<Self>) -> &Self
fn as_dyn(remote: &Remote<Self>) -> &Self
remote, because
only it knows the trait.Source§fn as_dyn_mut(remote: &mut Remote<Self>) -> &mut Self
fn as_dyn_mut(remote: &mut Remote<Self>) -> &mut Self
Object] hands out.Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".