pub struct UserProperty<'a> { /* private fields */ }
Expand description
Writer for an user property dictionary. PDF 1.6+
An array of this struct is created by Attributes::user
.
Implementations§
source§impl<'a> UserProperty<'a>
impl<'a> UserProperty<'a>
sourcepub fn name(&mut self, name: TextStr<'_>) -> &mut Self
pub fn name(&mut self, name: TextStr<'_>) -> &mut Self
Write the /N
attribute to set the name of the property.
sourcepub fn value(&mut self) -> Obj<'_>
pub fn value(&mut self) -> Obj<'_>
Start writing the /V
attribute to set the value of the property.
sourcepub fn format(&mut self, format: TextStr<'_>) -> &mut Self
pub fn format(&mut self, format: TextStr<'_>) -> &mut Self
Write the /F
attribute to set the format of the property.
Write the /H
attribute to determine whether this property is hidden.
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 UserProperty<'a>
impl<'a> Deref for UserProperty<'a>
source§impl<'a> DerefMut for UserProperty<'a>
impl<'a> DerefMut for UserProperty<'a>
source§impl<'a, 'any> Rewrite<'a> for UserProperty<'any>
impl<'a, 'any> Rewrite<'a> for UserProperty<'any>
source§type Output = UserProperty<'a>
type Output = UserProperty<'a>
The writer with the rewritten lifetime.
Auto Trait Implementations§
impl<'a> Freeze for UserProperty<'a>
impl<'a> RefUnwindSafe for UserProperty<'a>
impl<'a> Send for UserProperty<'a>
impl<'a> Sync for UserProperty<'a>
impl<'a> Unpin for UserProperty<'a>
impl<'a> !UnwindSafe for UserProperty<'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