Method
selected_repo
(&self, ctx: &Context<'_>)
Source from the content-addressed store, hash-verified
| 110 | } |
| 111 | |
| 112 | pub async fn selected_repo(&self, ctx: &Context<'_>) -> Result<Option<Repository>> { |
| 113 | match self { |
| 114 | Self::Guest => Ok(None), |
| 115 | Self::Registered { |
| 116 | selected_repo_id, .. |
| 117 | } => match selected_repo_id { |
| 118 | Some(id) => ctx.data_unchecked::<Store>().repo(id.to_string()).await, |
| 119 | None => Ok(None), |
| 120 | }, |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | pub async fn selected_repo_id(&self) -> Result<Option<ID>> { |
| 125 | match self { |
Callers
nothing calls this directly
Tested by
no test coverage detected