MCPcopy Create free account
hub / github.com/arcjet/gravity / classify

Method classify

examples/variants/src/lib.rs:10–18  ·  view source on GitHub ↗
(input: String)

Source from the content-addressed store, hash-verified

8
9impl Guest for VariantsWorld {
10 fn classify(input: String) -> Entity {
11 match input.as_str() {
12 "email" => Entity::Email,
13 "phone" => Entity::PhoneNumber,
14 "ip" => Entity::IpAddress,
15 "cc" => Entity::CreditCardNumber,
16 other => Entity::Custom(other.to_string()),
17 }
18 }
19
20 fn tag_all(inputs: Vec<String>) -> Vec<Detected> {
21 inputs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected