pub struct Transition<'a> { /* private fields */ }
Expand description
Writer for a transition dictionary.
This struct is created by Page::transition
.
Implementations§
source§impl<'a> Transition<'a>
impl<'a> Transition<'a>
sourcepub fn style(&mut self, kind: TransitionStyle) -> &mut Self
pub fn style(&mut self, kind: TransitionStyle) -> &mut Self
Write the /S
attribute to set the transition style.
sourcepub fn duration(&mut self, seconds: f32) -> &mut Self
pub fn duration(&mut self, seconds: f32) -> &mut Self
Write the /D
attribute to set the transition duration.
sourcepub fn dimension(&mut self, vertical: bool) -> &mut Self
pub fn dimension(&mut self, vertical: bool) -> &mut Self
Write the /Dm
attribute to set the transition direction. Will be
horizontal if the argument is false
.
sourcepub fn direction(&mut self, outward: bool) -> &mut Self
pub fn direction(&mut self, outward: bool) -> &mut Self
Write the /M
attribute to set the transition direction. Will be
inwards if the argument is false
.
sourcepub fn angle(&mut self, angle: TransitionAngle) -> &mut Self
pub fn angle(&mut self, angle: TransitionAngle) -> &mut Self
Write the /Di
attribute to set the transition angle.
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 Transition<'a>
impl<'a> Deref for Transition<'a>
source§impl<'a> DerefMut for Transition<'a>
impl<'a> DerefMut for Transition<'a>
source§impl<'a, 'any> Rewrite<'a> for Transition<'any>
impl<'a, 'any> Rewrite<'a> for Transition<'any>
source§type Output = Transition<'a>
type Output = Transition<'a>
The writer with the rewritten lifetime.
Auto Trait Implementations§
impl<'a> Freeze for Transition<'a>
impl<'a> RefUnwindSafe for Transition<'a>
impl<'a> Send for Transition<'a>
impl<'a> Sync for Transition<'a>
impl<'a> Unpin for Transition<'a>
impl<'a> !UnwindSafe for Transition<'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