pub struct NavItem {
pub label: String,
pub href: String,
pub icon: Option<String>,
pub image: Option<String>,
pub external: bool,
}Expand description
A navigation link within a Nav block.
Fields§
§label: String§href: String§icon: Option<String>§image: Option<String>Image emblem src (product link-cards). Renders before the label, in
place of an icon. Optional — links render text-only when absent.
external: boolOpen in a new tab (target="_blank" rel="noopener"). Used for external
product links in the rich shell nav.
Trait Implementations§
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
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