pub struct MenuPickerEntry {
pub label: String,
pub url: String,
pub kind_hint: Option<String>,
}Expand description
One row contributed by LibraryTypeHandler::menu_picker_entries
to the WP-style menu builder’s Library tab. Each entry
renders as a draggable picker card; dropping one into the tree
creates a MenuItem with external_url = url and label
inherited.
Fields§
§label: StringHuman label shown on the picker card and used as the menu item’s default label.
url: StringDestination URL the menu item points at. Stored as
MenuItem.external_url on save.
kind_hint: Option<String>Optional kind hint surfaced as a chip on the picker card (e.g. “Partner”, “Doc”, “Microsite”). Useful when one library type contributes multiple kinds.
Implementations§
Trait Implementations§
Source§impl Clone for MenuPickerEntry
impl Clone for MenuPickerEntry
Source§impl Debug for MenuPickerEntry
impl Debug for MenuPickerEntry
Auto Trait Implementations§
impl Freeze for MenuPickerEntry
impl RefUnwindSafe for MenuPickerEntry
impl Send for MenuPickerEntry
impl Sync for MenuPickerEntry
impl Unpin for MenuPickerEntry
impl UnsafeUnpin for MenuPickerEntry
impl UnwindSafe for MenuPickerEntry
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§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.