Struct alacritty::display::bell::VisualBell
source · pub struct VisualBell {
animation: BellAnimation,
duration: Duration,
start_time: Option<Instant>,
}
Fields§
§animation: BellAnimation
Visual bell animation.
duration: Duration
Visual bell duration.
start_time: Option<Instant>
The last time the visual bell rang, if at all.
Implementations§
source§impl VisualBell
impl VisualBell
sourcepub fn intensity(&self) -> f64
pub fn intensity(&self) -> f64
Get the currently intensity of the visual bell. The bell’s intensity ramps down from 1.0 to 0.0 at a rate determined by the bell’s duration.
sourcepub fn completed(&mut self) -> bool
pub fn completed(&mut self) -> bool
Check whether or not the visual bell has completed “ringing”.
sourcepub fn intensity_at_instant(&self, instant: Instant) -> f64
pub fn intensity_at_instant(&self, instant: Instant) -> f64
Get the intensity of the visual bell at a particular instant. The bell’s intensity ramps down from 1.0 to 0.0 at a rate determined by the bell’s duration.
pub fn update_config(&mut self, bell_config: &BellConfig)
Trait Implementations§
source§impl From<&BellConfig> for VisualBell
impl From<&BellConfig> for VisualBell
source§fn from(bell_config: &BellConfig) -> VisualBell
fn from(bell_config: &BellConfig) -> VisualBell
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for VisualBell
impl Send for VisualBell
impl Sync for VisualBell
impl Unpin for VisualBell
impl UnwindSafe for VisualBell
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.