pub struct TimelineData {
pub keyframes: Vec<TimelineKeyframe>,
pub loop_: bool,
pub start_time: Option<u64>,
pub duration: Option<u64>,
}Expand description
Timeline automation message Immutable once published - to modify, publish a new timeline
Fields§
§keyframes: Vec<TimelineKeyframe>Keyframes in chronological order
loop_: boolWhether the timeline loops
start_time: Option<u64>When to start playback (absolute server time in µs)
duration: Option<u64>Duration override in µs (if None, derived from last keyframe)
Implementations§
Source§impl TimelineData
impl TimelineData
Sourcepub fn new(keyframes: Vec<TimelineKeyframe>) -> TimelineData
pub fn new(keyframes: Vec<TimelineKeyframe>) -> TimelineData
Create a new timeline with keyframes
Sourcepub fn with_loop(self, loop_: bool) -> TimelineData
pub fn with_loop(self, loop_: bool) -> TimelineData
Set looping
Sourcepub fn with_start_time(self, time: u64) -> TimelineData
pub fn with_start_time(self, time: u64) -> TimelineData
Set start time
Trait Implementations§
Source§impl Clone for TimelineData
impl Clone for TimelineData
Source§fn clone(&self) -> TimelineData
fn clone(&self) -> TimelineData
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 TimelineData
impl Debug for TimelineData
Source§impl<'de> Deserialize<'de> for TimelineData
impl<'de> Deserialize<'de> for TimelineData
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimelineData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimelineData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TimelineData
impl PartialEq for TimelineData
Source§impl Serialize for TimelineData
impl Serialize for TimelineData
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TimelineData
Auto Trait Implementations§
impl Freeze for TimelineData
impl RefUnwindSafe for TimelineData
impl Send for TimelineData
impl Sync for TimelineData
impl Unpin for TimelineData
impl UnsafeUnpin for TimelineData
impl UnwindSafe for TimelineData
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