pub struct LinkBuilder { /* private fields */ }
Implementations§
Source§impl LinkBuilder
impl LinkBuilder
pub fn new() -> Self
Sourcepub fn text(self, text: impl Into<String>) -> Self
pub fn text(self, text: impl Into<String>) -> Self
Examples found in repository?
examples/basic.rs (line 20)
5fn main() {
6 let mut md = Markdown::new();
7 for _ in 1..=10 {
8 md.header1("hello").list(
9 ListBuilder::new()
10 .add("first")
11 .add("second")
12 .add(CheckmarkItem {
13 text: "Buy groceries",
14 checked: true,
15 })
16 .ordered(),
17 );
18 let link = Link::builder()
19 .footer(true)
20 .text("Hello")
21 .inlined()
22 .url("https://hello.world")
23 .build();
24 md.link(link);
25 }
26 println!("{}", md);
27}
Sourcepub fn url(self, url: impl Into<String>) -> Self
pub fn url(self, url: impl Into<String>) -> Self
Examples found in repository?
examples/basic.rs (line 22)
5fn main() {
6 let mut md = Markdown::new();
7 for _ in 1..=10 {
8 md.header1("hello").list(
9 ListBuilder::new()
10 .add("first")
11 .add("second")
12 .add(CheckmarkItem {
13 text: "Buy groceries",
14 checked: true,
15 })
16 .ordered(),
17 );
18 let link = Link::builder()
19 .footer(true)
20 .text("Hello")
21 .inlined()
22 .url("https://hello.world")
23 .build();
24 md.link(link);
25 }
26 println!("{}", md);
27}
Examples found in repository?
examples/basic.rs (line 19)
5fn main() {
6 let mut md = Markdown::new();
7 for _ in 1..=10 {
8 md.header1("hello").list(
9 ListBuilder::new()
10 .add("first")
11 .add("second")
12 .add(CheckmarkItem {
13 text: "Buy groceries",
14 checked: true,
15 })
16 .ordered(),
17 );
18 let link = Link::builder()
19 .footer(true)
20 .text("Hello")
21 .inlined()
22 .url("https://hello.world")
23 .build();
24 md.link(link);
25 }
26 println!("{}", md);
27}
Sourcepub fn inlined(self) -> Self
pub fn inlined(self) -> Self
Examples found in repository?
examples/basic.rs (line 21)
5fn main() {
6 let mut md = Markdown::new();
7 for _ in 1..=10 {
8 md.header1("hello").list(
9 ListBuilder::new()
10 .add("first")
11 .add("second")
12 .add(CheckmarkItem {
13 text: "Buy groceries",
14 checked: true,
15 })
16 .ordered(),
17 );
18 let link = Link::builder()
19 .footer(true)
20 .text("Hello")
21 .inlined()
22 .url("https://hello.world")
23 .build();
24 md.link(link);
25 }
26 println!("{}", md);
27}
Sourcepub fn build(self) -> Link
pub fn build(self) -> Link
Examples found in repository?
examples/basic.rs (line 23)
5fn main() {
6 let mut md = Markdown::new();
7 for _ in 1..=10 {
8 md.header1("hello").list(
9 ListBuilder::new()
10 .add("first")
11 .add("second")
12 .add(CheckmarkItem {
13 text: "Buy groceries",
14 checked: true,
15 })
16 .ordered(),
17 );
18 let link = Link::builder()
19 .footer(true)
20 .text("Hello")
21 .inlined()
22 .url("https://hello.world")
23 .build();
24 md.link(link);
25 }
26 println!("{}", md);
27}
Trait Implementations§
Source§impl Clone for LinkBuilder
impl Clone for LinkBuilder
Source§fn clone(&self) -> LinkBuilder
fn clone(&self) -> LinkBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LinkBuilder
impl Debug for LinkBuilder
Source§impl Default for LinkBuilder
impl Default for LinkBuilder
Source§fn default() -> LinkBuilder
fn default() -> LinkBuilder
Returns the “default value” for a type. Read more
Source§impl PartialEq for LinkBuilder
impl PartialEq for LinkBuilder
impl Eq for LinkBuilder
impl StructuralPartialEq for LinkBuilder
Auto Trait Implementations§
impl Freeze for LinkBuilder
impl RefUnwindSafe for LinkBuilder
impl Send for LinkBuilder
impl Sync for LinkBuilder
impl Unpin for LinkBuilder
impl UnwindSafe for LinkBuilder
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