pub(super) struct SlackSendRequest {
pub text: String,
pub channel_id: String,
pub title: Option<String>,
pub body: Option<String>,
pub blocks: Option<Vec<Value>>,
}Expand description
POST /api/messaging/slack/send
Dual path (spec §7): a raw Block Kit blocks escape hatch, a title/body
convenience path that synthesizes a minimal 2-block message server-side,
or plain text only. Block Kit doesn’t map onto the shared MsgEmbed
struct (see OutboundMsg.blocks doc comment in messaging/mod.rs), so
this handler builds blocks: Vec<serde_json::Value> directly rather than
reusing the Discord embed request shape.
Fields§
§text: StringPlain text — always sent as the top-level “text” field (required by Slack as the fallback/notification string even when blocks are present).
channel_id: StringOverride channel. Empty → use the bridge’s default channel.
title: Option<String>Optional convenience path: a title + body rendered as a simple two-block Block Kit message (header + section).
body: Option<String>§blocks: Option<Vec<Value>>Escape hatch: raw Block Kit blocks array, passed through verbatim
to chat.postMessage. If present, takes precedence over title/body.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SlackSendRequest
impl<'de> Deserialize<'de> for SlackSendRequest
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 Freeze for SlackSendRequest
impl RefUnwindSafe for SlackSendRequest
impl Send for SlackSendRequest
impl Sync for SlackSendRequest
impl Unpin for SlackSendRequest
impl UnsafeUnpin for SlackSendRequest
impl UnwindSafe for SlackSendRequest
Blanket Implementations§
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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