/
githubmirror
/
servo
Обзор
Документация
Войти
/
githubmirror
/
servo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
components/shared/webxr/space.rs
31 строка
906 B
Narfinger
webxr: Implement MallocSizeOf (#42505)
11 фев 2026, 11:39
Не верифицирован
11 фев 2026, 11:39
2f61982
Код
Авторство
О чём код?
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use euclid::RigidTransform3D; use malloc_size_of_derive::MallocSizeOf; use serde::{Deserialize, Serialize}; use crate::{InputId, Joint}; #[derive(Clone, Copy, Debug, Serialize, Deserialize, MallocSizeOf)] /// A stand-in type for "the space isn't statically known since /// it comes from client side code" pub struct ApiSpace; #[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] pub enum BaseSpace { Local, Floor, Viewer, BoundedFloor, TargetRay(InputId), Grip(InputId), Joint(InputId, Joint), } #[derive(Clone, Copy, Debug, Serialize, Deserialize)] pub struct Space { pub base: BaseSpace, pub offset: RigidTransform3D<f32, ApiSpace, ApiSpace>, }