Struct TermuxNotification

Source
pub struct TermuxNotification {
Show 26 fields pub title: Option<String>, pub content: Option<String>, pub action: Option<String>, pub button1_text: Option<String>, pub button1_action: Option<String>, pub button2_text: Option<String>, pub button2_action: Option<String>, pub button3_text: Option<String>, pub button3_action: Option<String>, pub group: Option<String>, pub id: Option<u32>, pub image_path: Option<String>, pub led_color: Option<String>, pub led_off: Option<u32>, pub led_on: Option<u32>, pub on_delete: Option<String>, pub ongoing: bool, pub priority: Option<String>, pub sound: bool, pub vibrate_pattern: Option<String>, pub notification_type: Option<String>, pub media_next: Option<String>, pub media_pause: Option<String>, pub media_play: Option<String>, pub media_previous: Option<String>, pub alert_once: bool,
}

Fields§

§title: Option<String>§content: Option<String>§action: Option<String>§button1_text: Option<String>§button1_action: Option<String>§button2_text: Option<String>§button2_action: Option<String>§button3_text: Option<String>§button3_action: Option<String>§group: Option<String>§id: Option<u32>§image_path: Option<String>§led_color: Option<String>§led_off: Option<u32>§led_on: Option<u32>§on_delete: Option<String>§ongoing: bool§priority: Option<String>§sound: bool§vibrate_pattern: Option<String>§notification_type: Option<String>§media_next: Option<String>§media_pause: Option<String>§media_play: Option<String>§media_previous: Option<String>§alert_once: bool

Implementations§

Source§

impl TermuxNotification

Source

pub fn title(self, title: &str) -> Self

Source

pub fn content(self, content: &str) -> Self

Source

pub fn action(self, action: &str) -> Self

Source

pub fn button1(self, text: &str, action: &str) -> Self

Source

pub fn button2(self, text: &str, action: &str) -> Self

Source

pub fn button3(self, text: &str, action: &str) -> Self

Source

pub fn group(self, group: &str) -> Self

Source

pub fn id(self, id: &u32) -> Self

Source

pub fn image_path(self, path: &str) -> Self

Source

pub fn led_color(self, color: &str) -> Self

Source

pub fn led_off(self, milliseconds: u32) -> Self

Source

pub fn led_on(self, milliseconds: u32) -> Self

Source

pub fn on_delete(self, action: &str) -> Self

Source

pub fn ongoing(self, ongoing: bool) -> Self

Source

pub fn priority(self, priority: &str) -> Self

Source

pub fn sound(self, sound: bool) -> Self

Source

pub fn vibrate(self, pattern: &str) -> Self

Source

pub fn notification_type(self, ntype: &str) -> Self

Source

pub fn media_next(self, action: &str) -> Self

Source

pub fn media_pause(self, action: &str) -> Self

Source

pub fn media_play(self, action: &str) -> Self

Source

pub fn media_previous(self, action: &str) -> Self

Source

pub fn alert_once(self, alert_once: bool) -> Self

Source

pub fn new() -> Self

Source

pub fn run(&self) -> Result<(), TermuxError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.