pub struct Bridge(/* private fields */);Expand description
Allows for two or more plugins to be displayed side by side with no seperator; SubWidgets share the same timer
#[macro_use]
extern crate redblocks;
use redblocks::{
Widget, SubWidget, Bridge,
plugins::BatPlugin};
fn main() {
let joined = vec![SubWidget::new(BatPlugin::new_percent()), SubWidget::new(BatPlugin::new_time())];
let bridge = Bridge::new(joined);
let bar = vec![Widget::new(bridge, 1)];
start_bar!(bar);
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bridge
impl !RefUnwindSafe for Bridge
impl !Send for Bridge
impl !Sync for Bridge
impl Unpin for Bridge
impl !UnwindSafe for Bridge
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more