1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
//! This crate brings Slack's terrific [Block Kit 🔗] to //! the Rust ecosystem. //! //! This crate should hopefully come in handy if you need to //! build some rich functionality, or just want to send some //! slack messages without having to know Block Kit. //! //! Inside, you'll find simple models with an API that is //! thoroughly documented and (hopefully) easy to use. //! //! This is currently being actively developed so watch the repo for a //! stable v1 release! //! //! [Block Kit 🔗]: https://api.slack.com/block-kit #[macro_use] extern crate validator_derive; pub mod block_elements; pub mod blocks; pub mod compose; mod val_helpr; #[macro_export] #[doc(hidden)] macro_rules! impl_from_contents { ($enum_name:ident, $variant:ident, $contents_type:ty) => { impl From<$contents_type> for $enum_name { fn from(contents: $contents_type) -> Self { $enum_name::$variant(contents) } } }; }