pub struct SubprocessSource { /* private fields */ }Expand description
A source served by a spawned program speaking docs/plugin-protocol.md.
Implementations§
Source§impl SubprocessSource
impl SubprocessSource
Sourcepub fn connect(
program: &str,
args: &[String],
name: &SourceName,
config: &Value,
secrets: BTreeMap<String, String>,
) -> Result<Self, SourceError>
pub fn connect( program: &str, args: &[String], name: &SourceName, config: &Value, secrets: BTreeMap<String, String>, ) -> Result<Self, SourceError>
Spawn program, complete the handshake, and adopt the connection.
§Errors
Returns SourceError::Unavailable when the program cannot be run or stops
answering, the plugin’s own error when it refuses the handshake, and
SourceError::Config when the two sides do not speak the same protocol version
— refused by name, never guessed at (§6.1).
Sourcepub fn connect_with_deadline(
program: &str,
args: &[String],
name: &SourceName,
config: &Value,
secrets: BTreeMap<String, String>,
deadline: RequestDeadline,
) -> Result<Self, SourceError>
pub fn connect_with_deadline( program: &str, args: &[String], name: &SourceName, config: &Value, secrets: BTreeMap<String, String>, deadline: RequestDeadline, ) -> Result<Self, SourceError>
Sourcepub fn connect_with_deadlines(
program: &str,
args: &[String],
name: &SourceName,
config: &Value,
secrets: BTreeMap<String, String>,
handshake: RequestDeadline,
requests: RequestDeadline,
) -> Result<Self, SourceError>
pub fn connect_with_deadlines( program: &str, args: &[String], name: &SourceName, config: &Value, secrets: BTreeMap<String, String>, handshake: RequestDeadline, requests: RequestDeadline, ) -> Result<Self, SourceError>
Spawn a plugin, bounding the initialization handshake and every later request separately.
handshake bounds the one initialize exchange of §3, and a newly spawned child
does its own starting up inside that exchange: whatever a runtime loads before it
can read its first line is counted against this bound. requests bounds every
exchange after the handshake succeeded, each on its own, against a child that is by
then already running. They are the same bound in
connect_with_deadline and in every configured
source, because one deadline_ms is what docs/plugin-protocol.md §1 gives a user
to set. Separating them is for a caller that means to hold a request to a span
shorter than a program takes to start — the engine’s own probe of what a silent
child’s expired request reports — where one bound would fail the handshake on a
loaded host instead of reaching the behaviour it was after.
§Errors
What connect returns.
Sourcepub fn connect_from_document(
program: &str,
args: &[String],
name: &SourceName,
config: &Value,
secrets: BTreeMap<String, String>,
deadline: RequestDeadline,
document_dir: Option<&Path>,
) -> Result<Self, SourceError>
pub fn connect_from_document( program: &str, args: &[String], name: &SourceName, config: &Value, secrets: BTreeMap<String, String>, deadline: RequestDeadline, document_dir: Option<&Path>, ) -> Result<Self, SourceError>
Spawn a plugin, telling it which document’s directory its settings are measured
from — document_dir in docs/plugin-protocol.md §3, sent only when there is one.
§Errors
What connect returns, and SourceError::Config when
document_dir is not an absolute directory whose name is valid UTF-8, and so
cannot be written into the handshake — refused rather than dropped, because dropping
it would silently measure the child’s paths from its working directory instead.
Sourcepub fn over(
to_plugin: impl Write + Send + 'static,
from_plugin: impl Read + Send + 'static,
name: &SourceName,
config: &Value,
secrets: BTreeMap<String, String>,
) -> Result<Self, SourceError>
pub fn over( to_plugin: impl Write + Send + 'static, from_plugin: impl Read + Send + 'static, name: &SourceName, config: &Value, secrets: BTreeMap<String, String>, ) -> Result<Self, SourceError>
Connect to a plugin that is already running, over streams somebody else owns.
The handshake, the framing and every refusal are the same as connect’s, because
they are the protocol’s rather than the process’s. What this constructor adds is
the ability to hold the other end: it is how the engine’s own tests drive this
half against serve over a real pipe, including the answers a
well-behaved program would never give.
§Errors
Returns what connect returns, minus the failures that belong to
spawning a program.
Sourcepub fn over_with_request_deadline(
to_plugin: impl Write + Send + 'static,
from_plugin: impl Read + Send + 'static,
name: &SourceName,
config: &Value,
secrets: BTreeMap<String, String>,
deadline: RequestDeadline,
) -> Result<Self, SourceError>
pub fn over_with_request_deadline( to_plugin: impl Write + Send + 'static, from_plugin: impl Read + Send + 'static, name: &SourceName, config: &Value, secrets: BTreeMap<String, String>, deadline: RequestDeadline, ) -> Result<Self, SourceError>
Connect over existing streams with a deadline for requests after initialization.
Unlike connect_with_deadline, this engine does
not own a process it can interrupt while the synchronous handshake is blocked.
The supplied deadline therefore begins only after initialization succeeds.
Trait Implementations§
Source§impl Debug for SubprocessSource
impl Debug for SubprocessSource
Source§impl TaskSource for SubprocessSource
impl TaskSource for SubprocessSource
Source§fn write_task_with_assets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Task>,
answers: Option<&'life2 BTreeMap<String, Value>>,
assets: &'life3 AssetWrite,
) -> Pin<Box<dyn Future<Output = Result<AssetsWritten, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn write_task_with_assets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Task>,
answers: Option<&'life2 BTreeMap<String, Value>>,
assets: &'life3 AssetWrite,
) -> Pin<Box<dyn Future<Output = Result<AssetsWritten, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
A write_task carrying assets beside the write, answered with the id and the content
the plugin stored; see docs/plugin-protocol.md §4.9.
Source§fn write_document_with_assets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Document>,
answers: Option<&'life2 BTreeMap<String, Value>>,
assets: &'life3 AssetWrite,
) -> Pin<Box<dyn Future<Output = Result<AssetsWritten, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn write_document_with_assets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Document>,
answers: Option<&'life2 BTreeMap<String, Value>>,
assets: &'life3 AssetWrite,
) -> Pin<Box<dyn Future<Output = Result<AssetsWritten, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
A write_document carrying assets, on the terms of
write_task_with_assets.
Source§fn update_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
update: &'life2 TaskUpdate,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskUpdateOutcome>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
update: &'life2 TaskUpdate,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskUpdateOutcome>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
§3.10: sent only to a plugin whose handshake sets targeted_updates. One that does not
is updated through the reads and the write_task it already answers — the contract’s
own default — so a plugin written before the method is correct and merely not minimal.
Source§fn kind(&self) -> &'static str
fn kind(&self) -> &'static str
Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
Source§fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Health, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Health, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Task>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Task>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
None when there is no such task. Read moreSource§fn get_project<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Project>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_project<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Project>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
None when there is no such project. Read moreSource§fn query_tasks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 TaskQuery,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Task>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query_tasks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 TaskQuery,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Task>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
query. Read moreSource§fn query_projects<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 ProjectQuery,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Project>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query_projects<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 ProjectQuery,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Project>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
query. Read moreSource§fn labels<'life0, 'life1, 'async_trait>(
&'life0 self,
page: &'life1 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Label>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn labels<'life0, 'life1, 'async_trait>(
&'life0 self,
page: &'life1 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Label>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn task_dependencies<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
direction: Direction,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<DependencyEdge>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn task_dependencies<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
direction: Direction,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<DependencyEdge>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn project_dependencies<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
direction: Direction,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<DependencyEdge>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_dependencies<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
direction: Direction,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<DependencyEdge>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn writes(&self) -> WriteSupport
fn writes(&self) -> WriteSupport
Source§fn write_task<'life0, 'life1, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Task>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_task<'life0, 'life1, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Task>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn set_task_rendering_with_assets<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
assets: &'life5 AssetWrite,
) -> Pin<Box<dyn Future<Output = Result<Option<AssetsWritten>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn set_task_rendering_with_assets<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
assets: &'life5 AssetWrite,
) -> Pin<Box<dyn Future<Output = Result<Option<AssetsWritten>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
set_task_rendering does,
and its asset set as write_task_with_assets does, in
one write; or answer None when this source holds no such task. Read moreSource§fn set_document_rendering_with_assets<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
assets: &'life5 AssetWrite,
) -> Pin<Box<dyn Future<Output = Result<Option<AssetsWritten>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn set_document_rendering_with_assets<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
assets: &'life5 AssetWrite,
) -> Pin<Box<dyn Future<Output = Result<Option<AssetsWritten>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
set_task_rendering_with_assets. Read moreSource§fn write_project<'life0, 'life1, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Project>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_project<'life0, 'life1, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Project>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
write_task. Read moreSource§fn set_task_status<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
category: StatusCategory,
) -> Pin<Box<dyn Future<Output = Result<Option<Status>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_task_status<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
category: StatusCategory,
) -> Pin<Box<dyn Future<Output = Result<Option<Status>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
None when this source
holds no such task. Read moreSource§fn set_task_priority<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
priority: Priority,
) -> Pin<Box<dyn Future<Output = Result<Option<Priority>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_task_priority<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
priority: Priority,
) -> Pin<Box<dyn Future<Output = Result<Option<Priority>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
None when this source
holds no such task. Read moreSource§fn set_task_content<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_task_content<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
content, byte for byte, and
change nothing else about it — or answer None when this source holds no such task. Read moreSource§fn set_delivered_by<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
delivered_by: &'life2 [TaskRef],
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_delivered_by<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
delivered_by: &'life2 [TaskRef],
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Task::delivered_by of one task this source holds, and change nothing
else about it — or answer None when this source holds no such task. Read moreSource§fn set_task_metadata<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
key: &'life2 MetadataKey,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Option<Task>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_task_metadata<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
key: &'life2 MetadataKey,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Option<Task>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
None when this source holds no such task. Read moreSource§fn set_project_metadata<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
key: &'life2 MetadataKey,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Option<Project>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_project_metadata<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
key: &'life2 MetadataKey,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Option<Project>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
set_task_metadata. Read moreSource§fn set_document_metadata<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
key: &'life2 MetadataKey,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Option<Document>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_document_metadata<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
key: &'life2 MetadataKey,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Option<Document>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
set_task_metadata. Read moreSource§fn task_template_answers<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<BTreeMap<String, Value>>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn task_template_answers<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<BTreeMap<String, Value>>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
id was last rendered from, as this source keeps them
beside the task — or None when it keeps none for it, or holds no such task. Read moreSource§fn document_template_answers<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<BTreeMap<String, Value>>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn document_template_answers<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<BTreeMap<String, Value>>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
id was last rendered from, on exactly the terms of
task_template_answers. Read moreSource§fn project_template_answers<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<BTreeMap<String, Value>>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn project_template_answers<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<BTreeMap<String, Value>>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
id was last rendered from, on exactly the terms of
task_template_answers. Read moreSource§fn write_task_rendered<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Task>,
answers: &'life2 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_task_rendered<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Task>,
answers: &'life2 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
write_task does, keeping
answers — the answers its content was rendered from — beside it in the same write
where this source keeps answers at all. Read moreSource§fn write_document_rendered<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Document>,
answers: &'life2 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_document_rendered<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Document>,
answers: &'life2 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
write_task_rendered. Read moreSource§fn write_project_rendered<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Project>,
answers: &'life2 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_project_rendered<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Project>,
answers: &'life2 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
write_task_rendered. Read moreSource§fn set_task_rendering<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn set_task_rendering<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
MetadataKey::TEMPLATE_KEY entry, set to provenance, and the answers it keeps
beside the task where it keeps any — in one write, and change nothing else about it;
or answer None when this source holds no such task. Read moreSource§fn set_document_rendering<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn set_document_rendering<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
set_task_rendering. A source declaring
Capabilities::documents unsupported is never asked. Read moreSource§fn set_project_rendering<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn set_project_rendering<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
content: &'life2 str,
provenance: &'life3 Value,
answers: &'life4 BTreeMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
set_task_rendering: its content, its
MetadataKey::TEMPLATE_KEY entry and the answers kept beside it change, and its
title, status, labels, every other metadata entry, repositories and dependencies are
left exactly as they are. Read moreSource§fn delete_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn delete_project<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_project<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
delete_task. Read moreSource§fn get_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Document>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<Document>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
None when there is no such document. Read moreSource§fn query_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 DocumentQuery,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Document>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 DocumentQuery,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Page<Document>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
query. Read moreSource§fn write_document<'life0, 'life1, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Document>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_document<'life0, 'life1, 'async_trait>(
&'life0 self,
write: &'life1 ItemWrite<Document>,
) -> Pin<Box<dyn Future<Output = Result<NativeId, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
write_task. Read moreSource§fn delete_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
delete_task. Read moreSource§fn task_comments<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task: &'life1 NativeId,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Option<Page<Comment>>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn task_comments<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task: &'life1 NativeId,
page: &'life2 PageRequest,
) -> Pin<Box<dyn Future<Output = Result<Option<Page<Comment>>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
task, oldest first, or None when this source holds
no such task. Read moreSource§fn add_comment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task: &'life1 NativeId,
comment: &'life2 NewComment,
) -> Pin<Box<dyn Future<Output = Result<Option<Comment>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_comment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task: &'life1 NativeId,
comment: &'life2 NewComment,
) -> Pin<Box<dyn Future<Output = Result<Option<Comment>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
task, answering with the comment as the source now holds it, or
None when this source holds no such task. Read moreSource§fn edit_comment<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
task: &'life1 NativeId,
comment: &'life2 NativeId,
body: &'life3 CommentBody,
) -> Pin<Box<dyn Future<Output = Result<Option<Comment>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn edit_comment<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
task: &'life1 NativeId,
comment: &'life2 NativeId,
body: &'life3 CommentBody,
) -> Pin<Box<dyn Future<Output = Result<Option<Comment>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
comment on task, answering with the comment as the
source now holds it, or None when this source holds no such task or that task has no
such comment. Read moreSource§fn delete_comment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task: &'life1 NativeId,
comment: &'life2 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<NativeId>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_comment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task: &'life1 NativeId,
comment: &'life2 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Option<NativeId>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
comment from task, answering with the id it removed, or None
when this source holds no such task or that task has no such comment. Read moreSource§fn metering<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Metering>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn metering<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Metering>, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
None when it does not meter its own requests. Read moreSource§fn end_command<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn end_command<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_task_details<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ids: &'life1 [NativeId],
comments: Option<&'life2 PageRequest>,
) -> Pin<Box<dyn Future<Output = Vec<Result<Option<TaskDetailRead>, SourceError>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_task_details<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ids: &'life1 [NativeId],
comments: Option<&'life2 PageRequest>,
) -> Pin<Box<dyn Future<Output = Vec<Result<Option<TaskDetailRead>, SourceError>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
comments names the page to read — one answer per id, in the order they were
given. Read moreSource§fn check_status_write<'life0, 'life1, 'async_trait>(
&'life0 self,
kind: ItemKind,
category: StatusCategory,
target: Option<&'life1 NativeId>,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn check_status_write<'life0, 'life1, 'async_trait>(
&'life0 self,
kind: ItemKind,
category: StatusCategory,
target: Option<&'life1 NativeId>,
) -> Pin<Box<dyn Future<Output = Result<(), SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
kind at category — over the item target names, or
creating one when it is None — would have a status to write, asked before the write
and changing nothing. Read moreSource§fn set_task_status_reading<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
category: StatusCategory,
) -> Pin<Box<dyn Future<Output = Result<Option<Task>, SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn set_task_status_reading<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
category: StatusCategory,
) -> Pin<Box<dyn Future<Output = Result<Option<Task>, SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
set_task_status
does, and answer with the whole task as this source now reads it — its
Task::delivers among what a caller keeping delivered tasks in step needs — or None
when this source holds no such task. Read moreSource§fn keeps_template_answers(&self) -> bool
fn keeps_template_answers(&self) -> bool
Source§fn task_assets<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Asset>, SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn task_assets<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Asset>, SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
id holds, or none when it holds none or this source holds
no such task. Read moreSource§fn document_assets<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Asset>, SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn document_assets<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Asset>, SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§fn task_asset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
name: &'life2 AssetName,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn task_asset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 NativeId,
name: &'life2 AssetName,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, SourceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
name the task id holds, or None when it holds no such asset
or this source holds no such task. Read more