pub struct Animation {
pub name: Option<String>,
pub global_duration: Option<f32>,
pub tracks: Vec<Box<dyn TrackTrait>>,
}Expand description
The overarching type for animations
This type implements serde::Deserialize and is meant to be deserealized from an AnimJ (JSON) structure
There is also a function for writing an AnimX stream (Binary)
Deserealizing AnimX is currently not supported
Fields§
§name: Option<String>§global_duration: Option<f32>§tracks: Vec<Box<dyn TrackTrait>>Implementations§
Source§impl Animation
impl Animation
Sourcepub fn write_animx(&self, buf: impl Write)
pub fn write_animx(&self, buf: impl Write)
Function for writing data as an AnimX stream
Compression is not yet supported.
use resonite_core::animation::Animation;
let anim: Animation = serde_json::from_str(/* AnimJ */)?;
let mut buf = Vec::new();
anim.write_animx(&mut buf);Trait Implementations§
Source§impl<'de> Deserialize<'de> for Animation
impl<'de> Deserialize<'de> for Animation
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
Auto Trait Implementations§
impl Freeze for Animation
impl !RefUnwindSafe for Animation
impl !Send for Animation
impl !Sync for Animation
impl Unpin for Animation
impl !UnwindSafe for Animation
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