pub struct DialogBuilder<'a> { /* private fields */ }
Implementations§
Source§impl<'a> DialogBuilder<'a>
impl<'a> DialogBuilder<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Examples found in repository?
examples/basic.rs (line 4)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
fn main() {
DialogBuilder::new()
.message("Simple message boxes are very easy to create")
.title("Basic Example")
.build()
.show();
loop {
let response = DialogBuilder::new()
.message("Different buttons may be used, and the user's selection can be checked. Would you like to see this message again?")
.title("Selection Example")
.style(DialogStyle::Question)
.buttons(DialogButtons::YesNo)
.build()
.show();
if response != DialogSelection::Yes {
break;
}
}
}
Sourcepub fn message(self, message: &'a str) -> Self
pub fn message(self, message: &'a str) -> Self
Examples found in repository?
examples/basic.rs (line 5)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
fn main() {
DialogBuilder::new()
.message("Simple message boxes are very easy to create")
.title("Basic Example")
.build()
.show();
loop {
let response = DialogBuilder::new()
.message("Different buttons may be used, and the user's selection can be checked. Would you like to see this message again?")
.title("Selection Example")
.style(DialogStyle::Question)
.buttons(DialogButtons::YesNo)
.build()
.show();
if response != DialogSelection::Yes {
break;
}
}
}
Sourcepub fn title(self, title: &'a str) -> Self
pub fn title(self, title: &'a str) -> Self
Examples found in repository?
examples/basic.rs (line 6)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
fn main() {
DialogBuilder::new()
.message("Simple message boxes are very easy to create")
.title("Basic Example")
.build()
.show();
loop {
let response = DialogBuilder::new()
.message("Different buttons may be used, and the user's selection can be checked. Would you like to see this message again?")
.title("Selection Example")
.style(DialogStyle::Question)
.buttons(DialogButtons::YesNo)
.build()
.show();
if response != DialogSelection::Yes {
break;
}
}
}
Sourcepub fn style(self, style: DialogStyle) -> Self
pub fn style(self, style: DialogStyle) -> Self
Examples found in repository?
examples/basic.rs (line 14)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
fn main() {
DialogBuilder::new()
.message("Simple message boxes are very easy to create")
.title("Basic Example")
.build()
.show();
loop {
let response = DialogBuilder::new()
.message("Different buttons may be used, and the user's selection can be checked. Would you like to see this message again?")
.title("Selection Example")
.style(DialogStyle::Question)
.buttons(DialogButtons::YesNo)
.build()
.show();
if response != DialogSelection::Yes {
break;
}
}
}
Examples found in repository?
examples/basic.rs (line 15)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
fn main() {
DialogBuilder::new()
.message("Simple message boxes are very easy to create")
.title("Basic Example")
.build()
.show();
loop {
let response = DialogBuilder::new()
.message("Different buttons may be used, and the user's selection can be checked. Would you like to see this message again?")
.title("Selection Example")
.style(DialogStyle::Question)
.buttons(DialogButtons::YesNo)
.build()
.show();
if response != DialogSelection::Yes {
break;
}
}
}
Sourcepub fn build(self) -> Dialog<'a>
pub fn build(self) -> Dialog<'a>
Examples found in repository?
examples/basic.rs (line 7)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
fn main() {
DialogBuilder::new()
.message("Simple message boxes are very easy to create")
.title("Basic Example")
.build()
.show();
loop {
let response = DialogBuilder::new()
.message("Different buttons may be used, and the user's selection can be checked. Would you like to see this message again?")
.title("Selection Example")
.style(DialogStyle::Question)
.buttons(DialogButtons::YesNo)
.build()
.show();
if response != DialogSelection::Yes {
break;
}
}
}
Trait Implementations§
Source§impl<'a> Default for DialogBuilder<'a>
impl<'a> Default for DialogBuilder<'a>
Source§fn default() -> DialogBuilder<'a>
fn default() -> DialogBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for DialogBuilder<'a>
impl<'a> RefUnwindSafe for DialogBuilder<'a>
impl<'a> Send for DialogBuilder<'a>
impl<'a> Sync for DialogBuilder<'a>
impl<'a> Unpin for DialogBuilder<'a>
impl<'a> UnwindSafe for DialogBuilder<'a>
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