pub struct TipRules<'a> {
pub limits: TipLimits,
pub widths: &'a CellWidths,
pub placeholder: &'a dyn Fn(&str) -> bool,
pub face_problem: &'a dyn Fn(&str) -> Option<String>,
pub default_face: &'a str,
}Expand description
What from_source checks tips against besides their box: which
placeholders exist, and what is wrong with a tip’s face.
Fields§
§limits: TipLimitsHow much text the box holds.
widths: &'a CellWidthsHow many cells each character takes, which the limits count: the
font atlas’s (CellWidths::of), or CellWidths::NARROW.
placeholder: &'a dyn Fn(&str) -> boolWhether {name} is a placeholder the game fills in.
face_problem: &'a dyn Fn(&str) -> Option<String>What is wrong with a tip showing the face face (its own, or the
game’s default), if anything.
default_face: &'a strThe face of a tip that names none.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TipRules<'a>
impl<'a> !Send for TipRules<'a>
impl<'a> !Sync for TipRules<'a>
impl<'a> !UnwindSafe for TipRules<'a>
impl<'a> Freeze for TipRules<'a>
impl<'a> Unpin for TipRules<'a>
impl<'a> UnsafeUnpin for TipRules<'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