From 845c5b16db42d2a9082dec90c67f4781ec5eabb5 Mon Sep 17 00:00:00 2001 From: Larko <59736843+Larkooo@users.noreply.github.com> Date: Mon, 23 Dec 2024 21:30:47 +0700 Subject: [PATCH] feat(torii-grpc): add list to member value enum for usage in sdk (#2828) * feat(torii-grpc): add list to member value enum for usasge in sdk * fmt --- crates/torii/grpc/src/types/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/torii/grpc/src/types/mod.rs b/crates/torii/grpc/src/types/mod.rs index e9fe1fca42..6e088a7ae2 100644 --- a/crates/torii/grpc/src/types/mod.rs +++ b/crates/torii/grpc/src/types/mod.rs @@ -151,6 +151,7 @@ pub enum PatternMatching { pub enum MemberValue { Primitive(Primitive), String(String), + List(Vec), } #[derive(Debug, Serialize, Deserialize, PartialEq, Hash, Eq, Clone)] @@ -418,6 +419,14 @@ impl From for member_value::ValueType { member_value::ValueType::Primitive(primitive.into()) } MemberValue::String(string) => member_value::ValueType::String(string), + MemberValue::List(list) => { + member_value::ValueType::List(proto::types::MemberValueList { + values: list + .into_iter() + .map(|v| proto::types::MemberValue { value_type: Some(v.into()) }) + .collect(), + }) + } } } }