Struct kas_core::text::AccelString
source · pub struct AccelString { /* private fields */ }
Expand description
An accelerator key string
This is a label which supports highlighting of accelerator keys (elsewhere
called “access keys” or “mnemonics”). This type represents both the
displayed text (via FormattableText
implementation)
and the shortcut (via AccelString::keys
).
Markup: &&
translates to &
; &x
for any x
translates to x
and
identifies x
as an “accelerator key”; this may be drawn underlined and
may support keyboard access via e.g. Alt+X
Implementations§
source§impl AccelString
impl AccelString
Trait Implementations§
source§impl Clone for AccelString
impl Clone for AccelString
source§fn clone(&self) -> AccelString
fn clone(&self) -> AccelString
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AccelString
impl Debug for AccelString
source§impl Default for AccelString
impl Default for AccelString
source§fn default() -> AccelString
fn default() -> AccelString
Returns the “default value” for a type. Read more
source§impl FormattableText for AccelString
impl FormattableText for AccelString
type FontTokenIter<'a> = Empty<FontToken>
source§fn font_tokens(&self, _: f32) -> Self::FontTokenIter<'_>
fn font_tokens(&self, _: f32) -> Self::FontTokenIter<'_>
Construct an iterator over formatting items Read more
source§impl<T: Into<AccelString> + Copy> From<&T> for AccelString
impl<T: Into<AccelString> + Copy> From<&T> for AccelString
source§impl From<&str> for AccelString
impl From<&str> for AccelString
source§impl From<String> for AccelString
impl From<String> for AccelString
source§impl PartialEq<AccelString> for AccelString
impl PartialEq<AccelString> for AccelString
source§fn eq(&self, other: &AccelString) -> bool
fn eq(&self, other: &AccelString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for AccelString
impl StructuralEq for AccelString
impl StructuralPartialEq for AccelString
Auto Trait Implementations§
impl RefUnwindSafe for AccelString
impl Send for AccelString
impl Sync for AccelString
impl Unpin for AccelString
impl UnwindSafe for AccelString
Blanket Implementations§
source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<F> FormattableTextDyn for Fwhere
F: 'static + FormattableText + Clone,
impl<F> FormattableTextDyn for Fwhere
F: 'static + FormattableText + Clone,
source§fn clone_boxed(&self) -> Box<dyn FormattableTextDyn + 'static, Global>
fn clone_boxed(&self) -> Box<dyn FormattableTextDyn + 'static, Global>
Produce a boxed clone of self
source§fn font_tokens(&self, dpem: f32) -> OwningVecIter<FontToken> ⓘ
fn font_tokens(&self, dpem: f32) -> OwningVecIter<FontToken> ⓘ
Construct an iterator over formatting items Read more