pub struct SafeUrl(/* private fields */);Expand description
An application-resolved link or asset URL safe to put into a quoted HTML attribute.
This is a conservative replacement for the PHP asset and menu URL helpers’ permissive output. Only HTTP(S), single-slash rooted paths and fragments are accepted. Escape the value for HTML separately; this type does not mark HTML as trusted.
use oxblade_adminlte::SafeUrl;
let asset: SafeUrl = "/assets/adminlte.css".parse()?;
assert_eq!(asset.as_str(), "/assets/adminlte.css");Implementations§
Trait Implementations§
impl Eq for SafeUrl
impl StructuralPartialEq for SafeUrl
Auto Trait Implementations§
impl Forget for SafeUrl
impl Freeze for SafeUrl
impl Move for SafeUrl
impl RefUnwindSafe for SafeUrl
impl Send for SafeUrlwhere
RawVecInner: Send,
impl Sync for SafeUrlwhere
RawVecInner: Sync,
impl Unpin for SafeUrl
impl UnsafeUnpin for SafeUrl
impl UnwindSafe for SafeUrlwhere
RawVecInner: UnwindSafe,
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
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§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.impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoViewData for Twhere
T: Serialize,
impl<T> IntoViewData for Twhere
T: Serialize,
Source§fn into_view_data(self) -> ViewData
fn into_view_data(self) -> ViewData
Converts the value into view data.