MCPcopy Create free account
hub / github.com/emwalker/digraph / from

Method from

backend/src/graphql/mod.rs:53–69  ·  view source on GitHub ↗
(row: SessionRow)

Source from the content-addressed store, hash-verified

51
52impl From<SessionRow> for Viewer {
53 fn from(row: SessionRow) -> Self {
54 let repo_ids: Vec<RepoId> = row.write_repo_ids.into_iter().map(RepoId::from).collect();
55
56 let selected_repo_id: RepoId = match row.selected_repository_id {
57 Some(uuid) => uuid.into(),
58 None => RepoId::wiki(),
59 };
60
61 Viewer {
62 write_repo_ids: repo_ids.to_owned().into(),
63 read_repo_ids: repo_ids.into(),
64 session_id: Some(row.session_id),
65 context_repo_id: selected_repo_id,
66 super_user: false,
67 user_id: row.user_id.to_string(),
68 }
69 }
70}
71
72impl From<(String, Option<SessionRow>)> for Viewer {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected