Skip to main content

AppRoute

Enum AppRoute 

Source
pub enum AppRoute<'a> {
Show 29 variants Home, Login, Register, Logout, Search, Notifications, Releases, Branches, Tags, Commits { rev: Option<&'a str>, }, Commit { oid: &'a str, }, Compare { spec: Option<&'a str>, }, Tree { rev: &'a str, path: &'a str, }, Blob { rev: &'a str, path: &'a str, }, Issues { state: Option<&'a str>, label: Option<&'a str>, }, IssueDetail { id: u64, }, Pulls, PullNew, PullDetail { branch: &'a str, }, Actions, ActionRun { id: u64, }, Projects, Wiki { slug: Option<&'a str>, }, Security, Insights, Settings { section: Option<&'a str>, }, Admin, Agents, Custom(&'a str),
}
Expand description

Typed application routes generating percent-encoded, mount-aware URLs.

Variants§

§

Home

§

Login

§

Register

§

Logout

§

Search

§

Notifications

§

Releases

§

Branches

§

Tags

§

Commits

Fields

§rev: Option<&'a str>
§

Commit

Fields

§oid: &'a str
§

Compare

Fields

§spec: Option<&'a str>
§

Tree

Fields

§rev: &'a str
§path: &'a str
§

Blob

Fields

§rev: &'a str
§path: &'a str
§

Issues

Fields

§state: Option<&'a str>
§label: Option<&'a str>
§

IssueDetail

Fields

§id: u64
§

Pulls

§

PullNew

§

PullDetail

Fields

§branch: &'a str
§

Actions

§

ActionRun

Fields

§id: u64
§

Projects

§

Wiki

Fields

§slug: Option<&'a str>
§

Security

§

Insights

§

Settings

Fields

§section: Option<&'a str>
§

Admin

§

Agents

§

Custom(&'a str)

Extension path (e.g. v2.0 "/graph", "/stacks", "/agents/topology").

Implementations§

Source§

impl<'a> AppRoute<'a>

Source

pub fn to_url(self, mount: &MountPrefix) -> String

Format this route under mount, percent-encoding dynamic path and query values.

Trait Implementations§

Source§

impl<'a> Clone for AppRoute<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for AppRoute<'a>

Source§

impl<'a> Debug for AppRoute<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Eq for AppRoute<'a>

Source§

impl<'a> PartialEq for AppRoute<'a>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for AppRoute<'a>

Auto Trait Implementations§

§

impl<'a> Forget for AppRoute<'a>

§

impl<'a> Freeze for AppRoute<'a>
where &'a str: Freeze,

§

impl<'a> Move for AppRoute<'a>

§

impl<'a> RefUnwindSafe for AppRoute<'a>

§

impl<'a> Send for AppRoute<'a>
where &'a str: Send,

§

impl<'a> Sync for AppRoute<'a>

§

impl<'a> Unpin for AppRoute<'a>
where &'a str: Unpin,

§

impl<'a> UnsafeUnpin for AppRoute<'a>
where &'a str: UnsafeUnpin,

§

impl<'a> UnwindSafe for AppRoute<'a>
where &'a str: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.