pub struct TextBodyProperties {
pub wrap: Option<TextWrap>,
pub anchor: Option<TextAnchor>,
pub anchor_center: bool,
pub inset_left_emu: Option<i64>,
pub inset_top_emu: Option<i64>,
pub inset_right_emu: Option<i64>,
pub inset_bottom_emu: Option<i64>,
pub autofit: Option<TextAutofit>,
pub vertical_direction: Option<TextVerticalType>,
pub rotation_60000ths: i32,
}Expand description
<a:bodyPr>’s attributes (CT_TextBodyProperties) — text wrapping, vertical anchor, horizontal
centering, inset margins, and autofit. See TextBody’s doc comment for what else
CT_TextBodyProperties allows but isn’t modeled here (3D, preset text warp/WordArt).
Fields§
§wrap: Option<TextWrap>wrap — whether text wraps at the shape’s edge.
anchor: Option<TextAnchor>anchor — vertical alignment of the text block within the shape.
anchor_center: boolanchorCtr — additionally centers the text block horizontally within the shape (on top of
whatever anchor does vertically). Grounded against a real fixture.
inset_left_emu: Option<i64>lIns, in EMUs.
inset_top_emu: Option<i64>tIns, in EMUs.
inset_right_emu: Option<i64>rIns, in EMUs.
inset_bottom_emu: Option<i64>bIns, in EMUs.
autofit: Option<TextAutofit>EG_TextAutofit (<a:noAutofit/>/<a:normAutofit/>/ <a:spAutoFit/>) — how the text body
reacts to content that doesn’t fit its shape. None omits the choice entirely (Office’s own
implicit default, which real PowerPoint UI actually treats as equivalent to
TextAutofit::None).
vertical_direction: Option<TextVerticalType>vert (ST_TextVerticalType) — the text’s reading direction within its shape (horizontal,
stacked vertically, rotated 270°.). None omits the attribute ("horz", ordinary
left-to-right text, is the schema default). Grounded against a real fixture’s placeholder
(vert="eaVert").
rotation_60000ths: i32rot (ST_Angle, 60,000ths of a degree) — rotates the text within its shape, independent
of the shape’s own rotation (Transform2D::rotation_degrees, on the surrounding
<a:xfrm>). 0 (the default) omits the attribute. Grounded against a real fixture’s
<a:bodyPr rot="0".>.
Implementations§
Source§impl TextBodyProperties
impl TextBodyProperties
Sourcepub fn new() -> TextBodyProperties
pub fn new() -> TextBodyProperties
Examples found in repository?
19fn main() -> office_toolkit::Result<()> {
20 let path = output_path("pptx_text_formatting.pptx");
21
22 let spacing_shape = AutoShape::new(2, "Spacing")
23 .with_properties(
24 ShapeProperties::new().with_transform(
25 Transform2D::new()
26 .with_offset(838_200, 838_200)
27 .with_extent(6_000_000, 1_500_000),
28 ),
29 )
30 .with_text_body(
31 TextBody::new().with_paragraph(
32 TextParagraph::new()
33 .with_properties(
34 TextParagraphProperties::new()
35 .with_line_spacing(TextSpacing::Percent(150_000))
36 .with_space_before(TextSpacing::Points(1200))
37 .with_indent_emu(457_200)
38 .with_level(1),
39 )
40 .with_run(TextRun::text(
41 "Indented, 150% line spacing, 12pt space before.",
42 )),
43 ),
44 );
45
46 let bullets_shape = AutoShape::new(2, "Bullets")
47 .with_properties(
48 ShapeProperties::new().with_transform(
49 Transform2D::new()
50 .with_offset(838_200, 838_200)
51 .with_extent(6_000_000, 1_800_000),
52 ),
53 )
54 .with_text_body(
55 TextBody::new()
56 .with_paragraph(
57 TextParagraph::new()
58 .with_properties(
59 TextParagraphProperties::new()
60 .with_bullet(BulletKind::Character("\u{2022}".to_string())),
61 )
62 .with_run(TextRun::text("Bulleted item")),
63 )
64 .with_paragraph(
65 TextParagraph::new()
66 .with_properties(TextParagraphProperties::new().with_bullet(
67 BulletKind::AutoNumber {
68 scheme: "arabicPeriod".to_string(),
69 start_at: None,
70 },
71 ))
72 .with_run(TextRun::text("Auto-numbered item")),
73 ),
74 );
75
76 let autofit_shape = AutoShape::new(2, "Autofit")
77 .with_text_box(true)
78 .with_properties(
79 ShapeProperties::new().with_transform(
80 Transform2D::new()
81 .with_offset(838_200, 838_200)
82 .with_extent(4_000_000, 1_000_000),
83 ),
84 )
85 .with_text_body(
86 TextBody::new()
87 .with_properties(
88 TextBodyProperties::new()
89 .with_autofit(TextAutofit::Shape)
90 .with_anchor(TextAnchor::Center)
91 .with_anchor_center(true),
92 )
93 .with_paragraph(TextParagraph::new().with_run(TextRun::text(
94 "This shape resizes to fit its text, centered both ways.",
95 ))),
96 );
97
98 let casing_shape = AutoShape::new(2, "Casing")
99 .with_properties(
100 ShapeProperties::new().with_transform(
101 Transform2D::new()
102 .with_offset(838_200, 838_200)
103 .with_extent(6_000_000, 1_500_000),
104 ),
105 )
106 .with_text_body(
107 TextBody::new().with_paragraph(
108 TextParagraph::new()
109 .with_run(TextRun::text_with_properties(
110 "rendered in all caps, ",
111 TextRunProperties::new().with_text_caps(TextCaps::All),
112 ))
113 .with_run(TextRun::text_with_properties(
114 "widely spaced, ",
115 TextRunProperties::new().with_character_spacing_points(3.0),
116 ))
117 .with_run(TextRun::text_with_properties(
118 "highlighted",
119 TextRunProperties::new().with_highlight(Color::Rgb("FFFF00".to_string())),
120 ))
121 .with_run(TextRun::text_with_properties(
122 "2",
123 TextRunProperties::new().with_baseline_percent(30.0),
124 )),
125 ),
126 );
127
128 let field_shape = AutoShape::new(2, "Field")
129 .with_properties(
130 ShapeProperties::new().with_transform(
131 Transform2D::new()
132 .with_offset(838_200, 838_200)
133 .with_extent(3_000_000, 500_000),
134 ),
135 )
136 .with_text_body(
137 TextBody::new().with_paragraph(
138 TextParagraph::new()
139 .with_run(TextRun::text("Slide "))
140 .with_run(TextRun::field(
141 "{7A9E3F10-4B6C-4D2E-9A1F-8C5D6E7F0123}",
142 Some("slidenum".to_string()),
143 "1",
144 )),
145 ),
146 );
147
148 let presentation = Presentation::new()
149 .with_slide(Slide::new().with_shape(Shape::AutoShape(spacing_shape)))
150 .with_slide(Slide::new().with_shape(Shape::AutoShape(bullets_shape)))
151 .with_slide(Slide::new().with_shape(Shape::AutoShape(autofit_shape)))
152 .with_slide(Slide::new().with_shape(Shape::AutoShape(casing_shape)))
153 .with_slide(Slide::new().with_shape(Shape::AutoShape(field_shape)));
154
155 presentation.save_to_file(&path)?;
156 println!("Wrote {}", path.display());
157 Ok(())
158}pub fn with_wrap(self, wrap: TextWrap) -> TextBodyProperties
Sourcepub fn with_anchor(self, anchor: TextAnchor) -> TextBodyProperties
pub fn with_anchor(self, anchor: TextAnchor) -> TextBodyProperties
Examples found in repository?
19fn main() -> office_toolkit::Result<()> {
20 let path = output_path("pptx_text_formatting.pptx");
21
22 let spacing_shape = AutoShape::new(2, "Spacing")
23 .with_properties(
24 ShapeProperties::new().with_transform(
25 Transform2D::new()
26 .with_offset(838_200, 838_200)
27 .with_extent(6_000_000, 1_500_000),
28 ),
29 )
30 .with_text_body(
31 TextBody::new().with_paragraph(
32 TextParagraph::new()
33 .with_properties(
34 TextParagraphProperties::new()
35 .with_line_spacing(TextSpacing::Percent(150_000))
36 .with_space_before(TextSpacing::Points(1200))
37 .with_indent_emu(457_200)
38 .with_level(1),
39 )
40 .with_run(TextRun::text(
41 "Indented, 150% line spacing, 12pt space before.",
42 )),
43 ),
44 );
45
46 let bullets_shape = AutoShape::new(2, "Bullets")
47 .with_properties(
48 ShapeProperties::new().with_transform(
49 Transform2D::new()
50 .with_offset(838_200, 838_200)
51 .with_extent(6_000_000, 1_800_000),
52 ),
53 )
54 .with_text_body(
55 TextBody::new()
56 .with_paragraph(
57 TextParagraph::new()
58 .with_properties(
59 TextParagraphProperties::new()
60 .with_bullet(BulletKind::Character("\u{2022}".to_string())),
61 )
62 .with_run(TextRun::text("Bulleted item")),
63 )
64 .with_paragraph(
65 TextParagraph::new()
66 .with_properties(TextParagraphProperties::new().with_bullet(
67 BulletKind::AutoNumber {
68 scheme: "arabicPeriod".to_string(),
69 start_at: None,
70 },
71 ))
72 .with_run(TextRun::text("Auto-numbered item")),
73 ),
74 );
75
76 let autofit_shape = AutoShape::new(2, "Autofit")
77 .with_text_box(true)
78 .with_properties(
79 ShapeProperties::new().with_transform(
80 Transform2D::new()
81 .with_offset(838_200, 838_200)
82 .with_extent(4_000_000, 1_000_000),
83 ),
84 )
85 .with_text_body(
86 TextBody::new()
87 .with_properties(
88 TextBodyProperties::new()
89 .with_autofit(TextAutofit::Shape)
90 .with_anchor(TextAnchor::Center)
91 .with_anchor_center(true),
92 )
93 .with_paragraph(TextParagraph::new().with_run(TextRun::text(
94 "This shape resizes to fit its text, centered both ways.",
95 ))),
96 );
97
98 let casing_shape = AutoShape::new(2, "Casing")
99 .with_properties(
100 ShapeProperties::new().with_transform(
101 Transform2D::new()
102 .with_offset(838_200, 838_200)
103 .with_extent(6_000_000, 1_500_000),
104 ),
105 )
106 .with_text_body(
107 TextBody::new().with_paragraph(
108 TextParagraph::new()
109 .with_run(TextRun::text_with_properties(
110 "rendered in all caps, ",
111 TextRunProperties::new().with_text_caps(TextCaps::All),
112 ))
113 .with_run(TextRun::text_with_properties(
114 "widely spaced, ",
115 TextRunProperties::new().with_character_spacing_points(3.0),
116 ))
117 .with_run(TextRun::text_with_properties(
118 "highlighted",
119 TextRunProperties::new().with_highlight(Color::Rgb("FFFF00".to_string())),
120 ))
121 .with_run(TextRun::text_with_properties(
122 "2",
123 TextRunProperties::new().with_baseline_percent(30.0),
124 )),
125 ),
126 );
127
128 let field_shape = AutoShape::new(2, "Field")
129 .with_properties(
130 ShapeProperties::new().with_transform(
131 Transform2D::new()
132 .with_offset(838_200, 838_200)
133 .with_extent(3_000_000, 500_000),
134 ),
135 )
136 .with_text_body(
137 TextBody::new().with_paragraph(
138 TextParagraph::new()
139 .with_run(TextRun::text("Slide "))
140 .with_run(TextRun::field(
141 "{7A9E3F10-4B6C-4D2E-9A1F-8C5D6E7F0123}",
142 Some("slidenum".to_string()),
143 "1",
144 )),
145 ),
146 );
147
148 let presentation = Presentation::new()
149 .with_slide(Slide::new().with_shape(Shape::AutoShape(spacing_shape)))
150 .with_slide(Slide::new().with_shape(Shape::AutoShape(bullets_shape)))
151 .with_slide(Slide::new().with_shape(Shape::AutoShape(autofit_shape)))
152 .with_slide(Slide::new().with_shape(Shape::AutoShape(casing_shape)))
153 .with_slide(Slide::new().with_shape(Shape::AutoShape(field_shape)));
154
155 presentation.save_to_file(&path)?;
156 println!("Wrote {}", path.display());
157 Ok(())
158}Sourcepub fn with_anchor_center(self, anchor_center: bool) -> TextBodyProperties
pub fn with_anchor_center(self, anchor_center: bool) -> TextBodyProperties
Additionally centers the text block horizontally (anchorCtr="1").
Examples found in repository?
19fn main() -> office_toolkit::Result<()> {
20 let path = output_path("pptx_text_formatting.pptx");
21
22 let spacing_shape = AutoShape::new(2, "Spacing")
23 .with_properties(
24 ShapeProperties::new().with_transform(
25 Transform2D::new()
26 .with_offset(838_200, 838_200)
27 .with_extent(6_000_000, 1_500_000),
28 ),
29 )
30 .with_text_body(
31 TextBody::new().with_paragraph(
32 TextParagraph::new()
33 .with_properties(
34 TextParagraphProperties::new()
35 .with_line_spacing(TextSpacing::Percent(150_000))
36 .with_space_before(TextSpacing::Points(1200))
37 .with_indent_emu(457_200)
38 .with_level(1),
39 )
40 .with_run(TextRun::text(
41 "Indented, 150% line spacing, 12pt space before.",
42 )),
43 ),
44 );
45
46 let bullets_shape = AutoShape::new(2, "Bullets")
47 .with_properties(
48 ShapeProperties::new().with_transform(
49 Transform2D::new()
50 .with_offset(838_200, 838_200)
51 .with_extent(6_000_000, 1_800_000),
52 ),
53 )
54 .with_text_body(
55 TextBody::new()
56 .with_paragraph(
57 TextParagraph::new()
58 .with_properties(
59 TextParagraphProperties::new()
60 .with_bullet(BulletKind::Character("\u{2022}".to_string())),
61 )
62 .with_run(TextRun::text("Bulleted item")),
63 )
64 .with_paragraph(
65 TextParagraph::new()
66 .with_properties(TextParagraphProperties::new().with_bullet(
67 BulletKind::AutoNumber {
68 scheme: "arabicPeriod".to_string(),
69 start_at: None,
70 },
71 ))
72 .with_run(TextRun::text("Auto-numbered item")),
73 ),
74 );
75
76 let autofit_shape = AutoShape::new(2, "Autofit")
77 .with_text_box(true)
78 .with_properties(
79 ShapeProperties::new().with_transform(
80 Transform2D::new()
81 .with_offset(838_200, 838_200)
82 .with_extent(4_000_000, 1_000_000),
83 ),
84 )
85 .with_text_body(
86 TextBody::new()
87 .with_properties(
88 TextBodyProperties::new()
89 .with_autofit(TextAutofit::Shape)
90 .with_anchor(TextAnchor::Center)
91 .with_anchor_center(true),
92 )
93 .with_paragraph(TextParagraph::new().with_run(TextRun::text(
94 "This shape resizes to fit its text, centered both ways.",
95 ))),
96 );
97
98 let casing_shape = AutoShape::new(2, "Casing")
99 .with_properties(
100 ShapeProperties::new().with_transform(
101 Transform2D::new()
102 .with_offset(838_200, 838_200)
103 .with_extent(6_000_000, 1_500_000),
104 ),
105 )
106 .with_text_body(
107 TextBody::new().with_paragraph(
108 TextParagraph::new()
109 .with_run(TextRun::text_with_properties(
110 "rendered in all caps, ",
111 TextRunProperties::new().with_text_caps(TextCaps::All),
112 ))
113 .with_run(TextRun::text_with_properties(
114 "widely spaced, ",
115 TextRunProperties::new().with_character_spacing_points(3.0),
116 ))
117 .with_run(TextRun::text_with_properties(
118 "highlighted",
119 TextRunProperties::new().with_highlight(Color::Rgb("FFFF00".to_string())),
120 ))
121 .with_run(TextRun::text_with_properties(
122 "2",
123 TextRunProperties::new().with_baseline_percent(30.0),
124 )),
125 ),
126 );
127
128 let field_shape = AutoShape::new(2, "Field")
129 .with_properties(
130 ShapeProperties::new().with_transform(
131 Transform2D::new()
132 .with_offset(838_200, 838_200)
133 .with_extent(3_000_000, 500_000),
134 ),
135 )
136 .with_text_body(
137 TextBody::new().with_paragraph(
138 TextParagraph::new()
139 .with_run(TextRun::text("Slide "))
140 .with_run(TextRun::field(
141 "{7A9E3F10-4B6C-4D2E-9A1F-8C5D6E7F0123}",
142 Some("slidenum".to_string()),
143 "1",
144 )),
145 ),
146 );
147
148 let presentation = Presentation::new()
149 .with_slide(Slide::new().with_shape(Shape::AutoShape(spacing_shape)))
150 .with_slide(Slide::new().with_shape(Shape::AutoShape(bullets_shape)))
151 .with_slide(Slide::new().with_shape(Shape::AutoShape(autofit_shape)))
152 .with_slide(Slide::new().with_shape(Shape::AutoShape(casing_shape)))
153 .with_slide(Slide::new().with_shape(Shape::AutoShape(field_shape)));
154
155 presentation.save_to_file(&path)?;
156 println!("Wrote {}", path.display());
157 Ok(())
158}Sourcepub fn with_insets_emu(
self,
left: i64,
top: i64,
right: i64,
bottom: i64,
) -> TextBodyProperties
pub fn with_insets_emu( self, left: i64, top: i64, right: i64, bottom: i64, ) -> TextBodyProperties
Sets all four insets at once, in EMUs.
Sourcepub fn with_autofit(self, autofit: TextAutofit) -> TextBodyProperties
pub fn with_autofit(self, autofit: TextAutofit) -> TextBodyProperties
Sets how this text body reacts to overflowing content.
Examples found in repository?
19fn main() -> office_toolkit::Result<()> {
20 let path = output_path("pptx_text_formatting.pptx");
21
22 let spacing_shape = AutoShape::new(2, "Spacing")
23 .with_properties(
24 ShapeProperties::new().with_transform(
25 Transform2D::new()
26 .with_offset(838_200, 838_200)
27 .with_extent(6_000_000, 1_500_000),
28 ),
29 )
30 .with_text_body(
31 TextBody::new().with_paragraph(
32 TextParagraph::new()
33 .with_properties(
34 TextParagraphProperties::new()
35 .with_line_spacing(TextSpacing::Percent(150_000))
36 .with_space_before(TextSpacing::Points(1200))
37 .with_indent_emu(457_200)
38 .with_level(1),
39 )
40 .with_run(TextRun::text(
41 "Indented, 150% line spacing, 12pt space before.",
42 )),
43 ),
44 );
45
46 let bullets_shape = AutoShape::new(2, "Bullets")
47 .with_properties(
48 ShapeProperties::new().with_transform(
49 Transform2D::new()
50 .with_offset(838_200, 838_200)
51 .with_extent(6_000_000, 1_800_000),
52 ),
53 )
54 .with_text_body(
55 TextBody::new()
56 .with_paragraph(
57 TextParagraph::new()
58 .with_properties(
59 TextParagraphProperties::new()
60 .with_bullet(BulletKind::Character("\u{2022}".to_string())),
61 )
62 .with_run(TextRun::text("Bulleted item")),
63 )
64 .with_paragraph(
65 TextParagraph::new()
66 .with_properties(TextParagraphProperties::new().with_bullet(
67 BulletKind::AutoNumber {
68 scheme: "arabicPeriod".to_string(),
69 start_at: None,
70 },
71 ))
72 .with_run(TextRun::text("Auto-numbered item")),
73 ),
74 );
75
76 let autofit_shape = AutoShape::new(2, "Autofit")
77 .with_text_box(true)
78 .with_properties(
79 ShapeProperties::new().with_transform(
80 Transform2D::new()
81 .with_offset(838_200, 838_200)
82 .with_extent(4_000_000, 1_000_000),
83 ),
84 )
85 .with_text_body(
86 TextBody::new()
87 .with_properties(
88 TextBodyProperties::new()
89 .with_autofit(TextAutofit::Shape)
90 .with_anchor(TextAnchor::Center)
91 .with_anchor_center(true),
92 )
93 .with_paragraph(TextParagraph::new().with_run(TextRun::text(
94 "This shape resizes to fit its text, centered both ways.",
95 ))),
96 );
97
98 let casing_shape = AutoShape::new(2, "Casing")
99 .with_properties(
100 ShapeProperties::new().with_transform(
101 Transform2D::new()
102 .with_offset(838_200, 838_200)
103 .with_extent(6_000_000, 1_500_000),
104 ),
105 )
106 .with_text_body(
107 TextBody::new().with_paragraph(
108 TextParagraph::new()
109 .with_run(TextRun::text_with_properties(
110 "rendered in all caps, ",
111 TextRunProperties::new().with_text_caps(TextCaps::All),
112 ))
113 .with_run(TextRun::text_with_properties(
114 "widely spaced, ",
115 TextRunProperties::new().with_character_spacing_points(3.0),
116 ))
117 .with_run(TextRun::text_with_properties(
118 "highlighted",
119 TextRunProperties::new().with_highlight(Color::Rgb("FFFF00".to_string())),
120 ))
121 .with_run(TextRun::text_with_properties(
122 "2",
123 TextRunProperties::new().with_baseline_percent(30.0),
124 )),
125 ),
126 );
127
128 let field_shape = AutoShape::new(2, "Field")
129 .with_properties(
130 ShapeProperties::new().with_transform(
131 Transform2D::new()
132 .with_offset(838_200, 838_200)
133 .with_extent(3_000_000, 500_000),
134 ),
135 )
136 .with_text_body(
137 TextBody::new().with_paragraph(
138 TextParagraph::new()
139 .with_run(TextRun::text("Slide "))
140 .with_run(TextRun::field(
141 "{7A9E3F10-4B6C-4D2E-9A1F-8C5D6E7F0123}",
142 Some("slidenum".to_string()),
143 "1",
144 )),
145 ),
146 );
147
148 let presentation = Presentation::new()
149 .with_slide(Slide::new().with_shape(Shape::AutoShape(spacing_shape)))
150 .with_slide(Slide::new().with_shape(Shape::AutoShape(bullets_shape)))
151 .with_slide(Slide::new().with_shape(Shape::AutoShape(autofit_shape)))
152 .with_slide(Slide::new().with_shape(Shape::AutoShape(casing_shape)))
153 .with_slide(Slide::new().with_shape(Shape::AutoShape(field_shape)));
154
155 presentation.save_to_file(&path)?;
156 println!("Wrote {}", path.display());
157 Ok(())
158}Sourcepub fn with_vertical_direction(
self,
direction: TextVerticalType,
) -> TextBodyProperties
pub fn with_vertical_direction( self, direction: TextVerticalType, ) -> TextBodyProperties
Sets the text’s reading direction within its shape.
Sourcepub fn with_rotation_degrees(self, degrees: f64) -> TextBodyProperties
pub fn with_rotation_degrees(self, degrees: f64) -> TextBodyProperties
Rotates the text within its shape, given in ordinary degrees (converted to the schema’s 60,000ths-of-a-degree unit internally).
Trait Implementations§
Source§impl Clone for TextBodyProperties
impl Clone for TextBodyProperties
Source§fn clone(&self) -> TextBodyProperties
fn clone(&self) -> TextBodyProperties
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TextBodyProperties
Source§impl Debug for TextBodyProperties
impl Debug for TextBodyProperties
Source§impl Default for TextBodyProperties
impl Default for TextBodyProperties
Source§fn default() -> TextBodyProperties
fn default() -> TextBodyProperties
impl Eq for TextBodyProperties
Source§impl PartialEq for TextBodyProperties
impl PartialEq for TextBodyProperties
impl StructuralPartialEq for TextBodyProperties
Auto Trait Implementations§
impl Freeze for TextBodyProperties
impl RefUnwindSafe for TextBodyProperties
impl Send for TextBodyProperties
impl Sync for TextBodyProperties
impl Unpin for TextBodyProperties
impl UnsafeUnpin for TextBodyProperties
impl UnwindSafe for TextBodyProperties
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.