pub struct BorderStyle<'a> { /* private fields */ }
Expand description
Writer for an border style dictionary.
This struct is created by Annotation::border_style
.
Implementations§
source§impl<'a> BorderStyle<'a>
impl<'a> BorderStyle<'a>
sourcepub fn width(&mut self, points: f32) -> &mut Self
pub fn width(&mut self, points: f32) -> &mut Self
Write the /W
attribute. This is the width of the border in points.
sourcepub fn style(&mut self, style: BorderType) -> &mut Self
pub fn style(&mut self, style: BorderType) -> &mut Self
Write the /S
attribute.
sourcepub fn dashes(
&mut self,
dash_pattern: impl IntoIterator<Item = f32>,
) -> &mut Self
pub fn dashes( &mut self, dash_pattern: impl IntoIterator<Item = f32>, ) -> &mut Self
Write the /D
attribute to set the repeating lengths of dashes and gaps
in between.
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.
Trait Implementations§
source§impl<'a> Deref for BorderStyle<'a>
impl<'a> Deref for BorderStyle<'a>
source§impl<'a> DerefMut for BorderStyle<'a>
impl<'a> DerefMut for BorderStyle<'a>
source§impl<'a, 'any> Rewrite<'a> for BorderStyle<'any>
impl<'a, 'any> Rewrite<'a> for BorderStyle<'any>
source§type Output = BorderStyle<'a>
type Output = BorderStyle<'a>
The writer with the rewritten lifetime.
Auto Trait Implementations§
impl<'a> Freeze for BorderStyle<'a>
impl<'a> RefUnwindSafe for BorderStyle<'a>
impl<'a> Send for BorderStyle<'a>
impl<'a> Sync for BorderStyle<'a>
impl<'a> Unpin for BorderStyle<'a>
impl<'a> !UnwindSafe for BorderStyle<'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