pub struct StyleSpecTransition {
pub duration: f32,
pub delay: f32,
}Expand description
Transition timing as declared in a JSON style spec.
Matches Mapbox GL JS TransitionSpecification:
{ "duration": 300, "delay": 0 }Both values are in milliseconds (they are converted to seconds at resolution time).
Fields§
§duration: f32Duration in milliseconds. Default: 300.
delay: f32Delay in milliseconds. Default: 0.
Implementations§
Source§impl StyleSpecTransition
impl StyleSpecTransition
Sourcepub fn to_runtime(&self) -> TransitionSpec
pub fn to_runtime(&self) -> TransitionSpec
Convert to the runtime [TransitionSpec] (seconds).
Trait Implementations§
Source§impl Clone for StyleSpecTransition
impl Clone for StyleSpecTransition
Source§fn clone(&self) -> StyleSpecTransition
fn clone(&self) -> StyleSpecTransition
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 StyleSpecTransition
impl Debug for StyleSpecTransition
Source§impl<'de> Deserialize<'de> for StyleSpecTransition
impl<'de> Deserialize<'de> for StyleSpecTransition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for StyleSpecTransition
impl Serialize for StyleSpecTransition
impl Copy for StyleSpecTransition
Auto Trait Implementations§
impl Freeze for StyleSpecTransition
impl RefUnwindSafe for StyleSpecTransition
impl Send for StyleSpecTransition
impl Sync for StyleSpecTransition
impl Unpin for StyleSpecTransition
impl UnsafeUnpin for StyleSpecTransition
impl UnwindSafe for StyleSpecTransition
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