pub struct MenuItem { /* private fields */ }Expand description
One compiled PHP menu entry. The serialized data contains plain text and validated URLs.
let builder: MenuBuilder = serde_json::from_str(r#"["Reports"]"#)?;
let menu = builder.compile("/", false, &Guest);
assert_eq!(menu.items()[0].text(), "Reports");Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for MenuItem
impl Freeze for MenuItemwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<MenuItem>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for MenuItem
impl RefUnwindSafe for MenuItem
impl Send for MenuItemwhere
RawVecInner: Send,
impl Sync for MenuItemwhere
RawVecInner: Sync,
impl Unpin for MenuItem
impl UnsafeUnpin for MenuItemwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<MenuItem>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for MenuItemwhere
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,
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.