pub type CommentConstructed<Meta> = Comment<Meta, String>;Expand description
Aliased Type§
pub struct CommentConstructed<Meta> {
pub meta: Meta,
pub calculation_list: String,
pub notify: Option<String>,
pub status: Status,
pub commands: Commands,
pub max_length: usize,
}Fields§
§meta: MetaMetadata (generic)
calculation_list: StringData for the current step
notify: Option<String>If Some will prepend a “Hey {string}!” to the reply.
status: Status§commands: Commands§max_length: usizeHow long the reply may at most be
Implementations§
Source§impl<Meta> CommentConstructed<Meta>
impl<Meta> CommentConstructed<Meta>
Sourcepub fn new(
comment_text: &str,
meta: Meta,
pre_commands: Commands,
max_length: usize,
) -> Self
pub fn new( comment_text: &str, meta: Meta, pre_commands: Commands, max_length: usize, ) -> Self
Takes a raw comment, finds the factorials and commands, and packages it, also checks if it might have something to calculate.
Sourcepub fn extract(self) -> CommentExtracted<Meta>
pub fn extract(self) -> CommentExtracted<Meta>
Extracts the calculations using parse.
Sourcepub fn new_already_replied(meta: Meta, max_length: usize) -> Self
pub fn new_already_replied(meta: Meta, max_length: usize) -> Self
Constructs an empty comment with Status already_replied_or_rejected set.