use crate::{AnimationHandle, AnimationRegistration};
#[derive(Debug, Clone, PartialEq)]
pub struct PropertyTransitionRegistration {
registration: AnimationRegistration,
replaced: Option<AnimationHandle>,
}
impl PropertyTransitionRegistration {
pub(crate) const fn new(
registration: AnimationRegistration,
replaced: Option<AnimationHandle>,
) -> Self {
Self {
registration,
replaced,
}
}
#[must_use]
pub const fn registration(&self) -> &AnimationRegistration {
&self.registration
}
#[must_use]
pub const fn handle(&self) -> AnimationHandle {
self.registration.handle()
}
#[must_use]
pub const fn replaced(&self) -> Option<AnimationHandle> {
self.replaced
}
#[must_use]
pub fn into_registration(self) -> AnimationRegistration {
self.registration
}
}