MCPcopy Create free account
hub / github.com/actix/examples / from

Method from

auth/simple-auth-server/src/models.rs:44–50  ·  view source on GitHub ↗
(email: T)

Source from the content-addressed store, hash-verified

42 T: Into<String>,
43{
44 fn from(email: T) -> Self {
45 Invitation {
46 id: Uuid::new_v4(),
47 email: email.into(),
48 expires_at: (Utc::now() + TimeDelta::try_hours(24).unwrap()).naive_utc(),
49 }
50 }
51}
52
53#[derive(Debug, Serialize, Deserialize)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected