pub struct BannerLine<'a> {
pub text: Cow<'a, str>,
pub x: f32,
pub y: f32,
pub size: f32,
pub color: [f32; 4],
}Expand description
One positioned line of the banner, ready to become a TextRun. The Cow
borrows the stored string whenever the line fits and owns only the truncated
copy, so a steady banner frame allocates nothing.
Fields§
§text: Cow<'a, str>The line’s text, already truncated to the surface width.
x: f32Left edge, device pixels from the surface’s top-left.
y: f32Top edge, device pixels from the surface’s top-left.
size: f32Font size in device pixels.
color: [f32; 4]Linear RGBA in 0.0..=1.0, with the envelope already applied to alpha.
Auto Trait Implementations§
impl<'a> Freeze for BannerLine<'a>
impl<'a> RefUnwindSafe for BannerLine<'a>
impl<'a> Send for BannerLine<'a>
impl<'a> Sync for BannerLine<'a>
impl<'a> Unpin for BannerLine<'a>
impl<'a> UnsafeUnpin for BannerLine<'a>
impl<'a> UnwindSafe for BannerLine<'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