MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / BadWordsResponse

Class BadWordsResponse

ch_11/src/profanity.rs:22–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21#[derive(Deserialize, Serialize, Debug, Clone)]
22struct BadWordsResponse {
23 content: String,
24 bad_words_total: i64,
25 bad_words_list: Vec<BadWord>,
26 censored_content: String,
27}
28
29pub async fn check_profanity(content: String) -> Result<String, handle_errors::Error> {
30 // We are already checking if the ENV VARIABLE is set inside main.rs, so safe to unwrap here

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected