pub enum Route {
Show 19 variants
Index,
OwnerIndex {
owner: String,
},
GitSmart {
rel_path: String,
},
RepoOverview {
owner: String,
repo: String,
},
Tree {
owner: String,
repo: String,
rev: String,
path: String,
},
Blob {
owner: String,
repo: String,
rev: String,
path: String,
},
Raw {
owner: String,
repo: String,
rev: String,
path: String,
},
Commits {
owner: String,
repo: String,
rev: String,
},
Commit {
owner: String,
repo: String,
sha: String,
},
Branches {
owner: String,
repo: String,
},
Tags {
owner: String,
repo: String,
},
Issues {
owner: String,
repo: String,
},
IssueNew {
owner: String,
repo: String,
},
IssueDetail {
owner: String,
repo: String,
num: u64,
},
ApiToken,
ApiHosted {
hex: String,
id: String,
},
ApiReposList,
ApiRepo {
owner: String,
repo: String,
},
NotFound,
}Expand description
A resolved forge route. Method-specific behaviour (GET list vs POST
create) is decided by the handler from crate::ForgeRequest::method;
this enum captures only the addressed resource.
Variants§
Index
GET / — global repo list.
OwnerIndex
GET /<owner> — a single owner’s repo list.
GitSmart
Any git smart-HTTP path (…/<owner>/<repo>.git/{info/refs, git-upload-pack,git-receive-pack}). The full prefix-stripped path
is forwarded verbatim to the git CGI service.
RepoOverview
GET /<owner>/<repo> — repo overview (branches + tree + README).
Fields
Tree
GET /<owner>/<repo>/tree/<ref>[/<path>] — directory listing.
Fields
Blob
GET /<owner>/<repo>/blob/<ref>/<path> — rendered file view.
Fields
Raw
GET /<owner>/<repo>/raw/<ref>/<path> — defended raw bytes.
Fields
Commits
GET /<owner>/<repo>/commits/<ref> — paginated commit log.
Commit
GET /<owner>/<repo>/commit/<sha> — single-commit view.
Fields
Branches
GET /<owner>/<repo>/branches.
Tags
GET /<owner>/<repo>/tags.
Issues
GET/POST /<owner>/<repo>/issues — list or create.
IssueNew
GET /<owner>/<repo>/issues/new — new-issue form.
IssueDetail
GET/POST /<owner>/<repo>/issues/<num> — thread view / comment.
ApiToken
POST /api/token — mint a forge push token.
ApiHosted
GET/DELETE /api/hosted/<hex>/<uuid> — podless body store.
ApiReposList
GET /api/repos — JSON repo list.
ApiRepo
GET /api/repos/<owner>/<repo> — JSON repo model.
NotFound
Unmatched — the handler returns 404.
Trait Implementations§
impl Eq for Route
impl StructuralPartialEq for Route
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
impl UnwindSafe for Route
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.