pub struct ModeInfo<'a> {
pub tab: Tab,
pub id: &'a str,
pub label: &'a str,
pub description: Option<&'a str>,
pub sprite: Option<&'a str>,
}Expand description
What MapModes::register takes. The strings are copied.
Fields§
§tab: TabThe tab.
id: &'a str<plugin-id>.<name>: the plugin’s own id, ., then [a-z0-9_-]{1,32}.
label: &'a strThe button’s name, 1 to 64 bytes.
description: Option<&'a str>The button’s tooltip, at most 512 bytes.
sprite: Option<&'a str>A sprite (GFX_...) of the game or of the plugin’s mod; None: an
empty button frame.
Implementations§
Trait Implementations§
impl<'a> Copy for ModeInfo<'a>
impl<'a> Eq for ModeInfo<'a>
impl<'a> StructuralPartialEq for ModeInfo<'a>
Auto Trait Implementations§
impl<'a> Forget for ModeInfo<'a>
impl<'a> Freeze for ModeInfo<'a>
impl<'a> Move for ModeInfo<'a>
impl<'a> RefUnwindSafe for ModeInfo<'a>
impl<'a> Send for ModeInfo<'a>
impl<'a> Sync for ModeInfo<'a>
impl<'a> Unpin for ModeInfo<'a>
impl<'a> UnsafeUnpin for ModeInfo<'a>
impl<'a> UnwindSafe for ModeInfo<'a>
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