Struct mas_router::UrlBuilder
source · pub struct UrlBuilder { /* private fields */ }
Implementations§
source§impl UrlBuilder
impl UrlBuilder
sourcepub fn absolute_url_for<U>(&self, destination: &U) -> Urlwhere
U: Route,
pub fn absolute_url_for<U>(&self, destination: &U) -> Urlwhere
U: Route,
Create an absolute URL for a route
sourcepub fn relative_url_for<U>(&self, destination: &U) -> Stringwhere
U: Route,
pub fn relative_url_for<U>(&self, destination: &U) -> Stringwhere
U: Route,
Create a relative URL for a route, prefixed with the base URL
sourcepub fn redirect<U>(&self, destination: &U) -> Redirectwhere
U: Route,
pub fn redirect<U>(&self, destination: &U) -> Redirectwhere
U: Route,
Create a (relative) redirect response to a route
sourcepub fn absolute_redirect<U>(&self, destination: &U) -> Redirectwhere
U: Route,
pub fn absolute_redirect<U>(&self, destination: &U) -> Redirectwhere
U: Route,
Create an absolute redirect response to a route
sourcepub fn new(base: Url, issuer: Option<Url>, assets_base: Option<String>) -> Self
pub fn new(base: Url, issuer: Option<Url>, assets_base: Option<String>) -> Self
Create a new UrlBuilder
from a base URL
§Panics
Panics if the base URL contains a fragment, a query, credentials or isn’t HTTP/HTTPS;
sourcepub fn public_hostname(&self) -> &str
pub fn public_hostname(&self) -> &str
sourcepub fn oidc_issuer(&self) -> Url
pub fn oidc_issuer(&self) -> Url
OIDC issuer
sourcepub fn oidc_discovery(&self) -> Url
pub fn oidc_discovery(&self) -> Url
OIDC discovery document URL
OAuth 2.0 authorization endpoint
sourcepub fn oauth_token_endpoint(&self) -> Url
pub fn oauth_token_endpoint(&self) -> Url
OAuth 2.0 token endpoint
sourcepub fn oauth_introspection_endpoint(&self) -> Url
pub fn oauth_introspection_endpoint(&self) -> Url
OAuth 2.0 introspection endpoint
sourcepub fn oauth_revocation_endpoint(&self) -> Url
pub fn oauth_revocation_endpoint(&self) -> Url
OAuth 2.0 revocation endpoint
sourcepub fn oauth_registration_endpoint(&self) -> Url
pub fn oauth_registration_endpoint(&self) -> Url
OAuth 2.0 client registration endpoint
OAuth 2.0 device authorization endpoint
sourcepub fn device_code_link(&self) -> Url
pub fn device_code_link(&self) -> Url
OAuth 2.0 device code link
sourcepub fn device_code_link_full(&self, code: String) -> Url
pub fn device_code_link_full(&self, code: String) -> Url
OAuth 2.0 device code link full URL
pub fn oidc_userinfo_endpoint(&self) -> Url
sourcepub fn static_asset(&self, path: String) -> Url
pub fn static_asset(&self, path: String) -> Url
Static asset
sourcepub fn assets_base(&self) -> &str
pub fn assets_base(&self) -> &str
Static asset base
sourcepub fn graphql_endpoint(&self) -> Url
pub fn graphql_endpoint(&self) -> Url
GraphQL endpoint
sourcepub fn upstream_oauth_callback(&self, id: Ulid) -> Url
pub fn upstream_oauth_callback(&self, id: Ulid) -> Url
Upstream redirect URI
Upstream authorize URI
sourcepub fn account_management_uri(&self) -> Url
pub fn account_management_uri(&self) -> Url
Account management URI
sourcepub fn account_recovery_link(&self, ticket: String) -> Url
pub fn account_recovery_link(&self, ticket: String) -> Url
Account recovery link
Trait Implementations§
source§impl Clone for UrlBuilder
impl Clone for UrlBuilder
source§fn clone(&self) -> UrlBuilder
fn clone(&self) -> UrlBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UrlBuilder
impl Debug for UrlBuilder
source§impl PartialEq for UrlBuilder
impl PartialEq for UrlBuilder
impl Eq for UrlBuilder
impl StructuralPartialEq for UrlBuilder
Auto Trait Implementations§
impl Freeze for UrlBuilder
impl RefUnwindSafe for UrlBuilder
impl Send for UrlBuilder
impl Sync for UrlBuilder
impl Unpin for UrlBuilder
impl UnwindSafe for UrlBuilder
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key
and return true
if they are equal.