MCPcopy Create free account
hub / github.com/dfinity/orbit / from

Method from

core/station/impl/src/mappers/user.rs:35–49  ·  view source on GitHub ↗
(user: User)

Source from the content-addressed store, hash-verified

33
34impl From<User> for UserDTO {
35 fn from(user: User) -> Self {
36 UserDTO {
37 id: Uuid::from_bytes(user.id).hyphenated().to_string(),
38 identities: user.identities,
39 name: user.name,
40 status: user.status.into(),
41 groups: user
42 .groups
43 .iter()
44 .filter_map(|group| USER_GROUP_REPOSITORY.get(group))
45 .map(Into::into)
46 .collect(),
47 last_modification_timestamp: timestamp_to_rfc3339(&user.last_modification_timestamp),
48 }
49 }
50}
51
52impl From<User> for BasicUserDTO {

Callers

nothing calls this directly

Calls 5

timestamp_to_rfc3339Function · 0.85
rfc3339_to_timestampFunction · 0.85
mapMethod · 0.80
iterMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected