rive_rs/importers/
keyed_object_importer.rs

1// Copyright 2021 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use crate::animation::{KeyedObject, KeyedProperty};
6use crate::core::Object;
7use crate::importers::ImportStackObject;
8
9#[derive(Debug)]
10pub struct KeyedObjectImporter {
11    keyed_object: Object<KeyedObject>,
12}
13
14impl KeyedObjectImporter {
15    pub fn new(keyed_object: Object<KeyedObject>) -> Self {
16        Self { keyed_object }
17    }
18
19    pub fn push_keyed_property(&self, keyed_property: Object<KeyedProperty>) {
20        self.keyed_object.as_ref().push_keyed_property(keyed_property);
21    }
22}
23
24impl ImportStackObject for KeyedObjectImporter {}