pub trait TopicContextProvider: Send + Sync {
// Required method
fn build_context<'a>(
&'a self,
operator_user_id: &'a str,
recent_history_json: &'a str,
credentials: Arc<dyn CredentialResolver>,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'a>>;
}Expand description
Builds a plain-text context block consumed by the proactive-post
topic generator. Implementation strategies vary by persona —
heartbit-ghost:x fetches own tweets + mentions; heartbit-rs:x
inspects the local repo.
Uses primitive types in the signature so heartbit-core stays free
of persona-crate value types. The recent_history_json argument
is a JSON-encoded Vec<PostHistoryEntry> (the persona crate
decodes it internally).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".