Skip to content

Commit

Permalink
impl TypeUuidProvider for Rect<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jan 25, 2025
1 parent 12035f3 commit 2ad612d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fyrox-core/src/type_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

use crate::math::Rect;
pub use fyrox_core_derive::ComponentProvider;
pub use fyrox_core_derive::TypeUuidProvider;
use std::any::{Any, TypeId};
Expand Down Expand Up @@ -73,6 +74,15 @@ uuid_provider!(bool = "3b104074-9d39-4a2b-b974-da8cc1759fe8");
uuid_provider!(PathBuf = "3b104074-9d39-4a2b-b974-da8cc1759666");
uuid_provider!(String = "3b104074-9d39-4a2b-b974-da8cc1759999");

impl<T: TypeUuidProvider> TypeUuidProvider for Rect<T> {
fn type_uuid() -> Uuid {
combine_uuids(
uuid::uuid!("0f88dcde-f145-4ba0-a5c1-cf5036fa0706"),
T::type_uuid(),
)
}
}

impl<T: TypeUuidProvider> TypeUuidProvider for Option<T> {
fn type_uuid() -> Uuid {
combine_uuids(
Expand Down

0 comments on commit 2ad612d

Please sign in to comment.