pub struct TaskNotification {
pub task_id: String,
pub title: String,
pub status: String,
pub agent: String,
pub duration_seconds: f64,
pub summary: String,
pub repo: Option<String>,
pub notify_target: Option<String>,
pub pr_number: Option<String>,
}Expand description
A task completion notification to broadcast to all channels.
Fields§
§task_id: String§title: String§status: String§agent: String§duration_seconds: f64§summary: String§repo: Option<String>Repository (owner/repo) this task belongs to, for multi-project routing.
notify_target: Option<String>Optional override chat_id for Telegram (e.g. from job notify_target).
When set, the notification is sent directly to this chat_id instead of
the channel routing logic.
pr_number: Option<String>PR number if a pull request is associated with the task.
Implementations§
Source§impl TaskNotification
impl TaskNotification
Sourcepub fn format_telegram(&self) -> String
pub fn format_telegram(&self) -> String
Format for Telegram (HTML).
Use HTML parse mode to avoid fragile Markdown escaping issues. Values are escaped for HTML entities (e.g. <, >, &) and simple tags are used for bold/monospace formatting.
Sourcepub fn format_slack(&self) -> String
pub fn format_slack(&self) -> String
Format for Slack (mrkdwn).
Slack uses its own “mrkdwn” dialect: bold, italic, code.
Sourcepub fn format_discord(&self) -> String
pub fn format_discord(&self) -> String
Format for Discord (Markdown with bold instead of Telegram-style).
Sourcepub fn format_with_project(&self, channel: &str) -> String
pub fn format_with_project(&self, channel: &str) -> String
Format with project prefix (for General/subscribed channels).
Prepends [project_name] to the channel-specific formatted message
so recipients of multi-project channels can identify the source.
Trait Implementations§
Source§impl Clone for TaskNotification
impl Clone for TaskNotification
Source§impl Debug for TaskNotification
impl Debug for TaskNotification
Source§impl<'de> Deserialize<'de> for TaskNotification
impl<'de> Deserialize<'de> for TaskNotification
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for TaskNotification
impl Freeze for TaskNotification
impl Move for TaskNotification
impl RefUnwindSafe for TaskNotification
impl Send for TaskNotificationwhere
RawVecInner: Send,
impl Sync for TaskNotificationwhere
RawVecInner: Sync,
impl Unpin for TaskNotification
impl UnsafeUnpin for TaskNotification
impl UnwindSafe for TaskNotificationwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AppData for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
impl<T> AppDataResponse for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more