pub struct Github { /* private fields */ }
Expand description
Displays the number of github notifications you have.
Trait Implementations§
Source§impl PanelConfig for Github
impl PanelConfig for Github
Source§fn parse(
name: &'static str,
table: &mut HashMap<String, Value>,
_global: &Config,
) -> Result<Self>
fn parse( name: &'static str, table: &mut HashMap<String, Value>, _global: &Config, ) -> Result<Self>
Parses an instance of the panel from the global [Config
]
Configuration options:
interval
: how long to wait between requests. The panel will never poll more often than this, but it may poll less often according to theX-Poll-Interval
header of the reponse. See https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#about-github-notifications for more information.token
: A file path containing your GitHub token. Visit https://github.com/settings/tokens/new to generate a token. Thenotifications
scope is required.filter
: An array of strings corresponding to notification reasons. See https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#about-notification-reasons for details.include
: Whether to include or exclude the reasons infilter
. Ifinclude
is true, only notifications with one of the reasons infilter
will be counted. Otherwise, only notifications with reasons not infilter
will be counted.show_zero
: Whether or not the panel is shown when you have zero notifications.format
: The formatting option. The only formatting option is%count%
.attrs
: A string specifying the attrs for the panel. SeeAttrs::parse
for details.highlight
: A string specifying the highlight for the panel. SeeHighlight::parse
for details.- See
PanelCommon::parse_common
.
Source§fn props(&self) -> (&'static str, bool)
fn props(&self) -> (&'static str, bool)
Returns the name of the panel. If the panel supports events, each
instance must return a unique name.
Source§fn run<'async_trait>(
self: Box<Self>,
cr: Rc<Context>,
global_attrs: Attrs,
height: i32,
) -> Pin<Box<dyn Future<Output = Result<(PanelStream, Option<ChannelEndpoint<Event, EventResponse>>)>> + 'async_trait>>where
Self: 'async_trait,
fn run<'async_trait>(
self: Box<Self>,
cr: Rc<Context>,
global_attrs: Attrs,
height: i32,
) -> Pin<Box<dyn Future<Output = Result<(PanelStream, Option<ChannelEndpoint<Event, EventResponse>>)>> + 'async_trait>>where
Self: 'async_trait,
Performs any necessary setup, then returns a
PanelStream
representing the provided PanelConfig
. Read moreAuto Trait Implementations§
impl Freeze for Github
impl !RefUnwindSafe for Github
impl !Send for Github
impl !Sync for Github
impl Unpin for Github
impl !UnwindSafe for Github
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