pub struct PanelId(/* private fields */);Expand description
A mounted panel’s identity: its prefix, normalized once when the panel is declared.
PanelUser::can_access_panel receives one, and a
mounted panel’s PanelHandle::id and Panel::id
give the same one. It compares equal to a prefix in any spelling
Panel::new accepts, so "admin", "/admin" and "/admin/" all name
Panel::new("admin"), and to nothing else: it exposes no string to match a substring or a
leading segment against.
let admin = PanelId::new("admin");
assert!(admin == "/admin");
assert!(admin == "admin/");
assert!(admin != "/admin-portal");
assert_eq!(admin, PanelId::new("/admin/"));
assert_eq!(admin.to_string(), "/admin");Implementations§
Trait Implementations§
impl Eq for PanelId
impl StructuralPartialEq for PanelId
Auto Trait Implementations§
impl Freeze for PanelId
impl RefUnwindSafe for PanelId
impl Send for PanelId
impl Sync for PanelId
impl Unpin for PanelId
impl UnsafeUnpin for PanelId
impl UnwindSafe for PanelId
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.