Skip to content

Commit

Permalink
feat(torii-grpc): add list to member value enum for usasge in sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Dec 20, 2024
1 parent c0b8033 commit dd193ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/torii/grpc/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ pub enum PatternMatching {
pub enum MemberValue {
Primitive(Primitive),
String(String),
List(Vec<MemberValue>),
}

#[derive(Debug, Serialize, Deserialize, PartialEq, Hash, Eq, Clone)]
Expand Down Expand Up @@ -418,6 +419,9 @@ impl From<MemberValue> 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(),
}),
}
}
}
Expand Down

0 comments on commit dd193ff

Please sign in to comment.