@@ -77,6 +77,23 @@ pub struct FunctionVersion {
77
77
/// The environment variables available to this function via the WASI environment interface.
78
78
pub environment : std:: collections:: HashMap < String , EnvironmentValue > ,
79
79
}
80
+ impl FunctionVersion {
81
+ /// The unique identifier for this function version.
82
+ pub fn version_id ( & self ) -> & FunctionVersionId {
83
+ & self . version_id
84
+ }
85
+
86
+ /// The wasm ID this function uses.
87
+ pub fn wasm_version_id ( & self ) -> & WasmVersionId {
88
+ & self . wasm_version_id
89
+ }
90
+
91
+ /// The environment variables available to this function via the WASI environment interface.
92
+ pub fn environment ( & self ) -> & std:: collections:: HashMap < String , EnvironmentValue > {
93
+ & self . environment
94
+ }
95
+ }
96
+
80
97
impl From < momento_protos:: function_types:: FunctionVersion > for FunctionVersion {
81
98
fn from ( proto : momento_protos:: function_types:: FunctionVersion ) -> Self {
82
99
let momento_protos:: function_types:: FunctionVersion {
@@ -146,6 +163,23 @@ pub struct Wasm {
146
163
name : String ,
147
164
description : String ,
148
165
}
166
+ impl Wasm {
167
+ /// The unique identifier for this wasm artifact.
168
+ pub fn id ( & self ) -> & WasmVersionId {
169
+ & self . id
170
+ }
171
+
172
+ /// The name of this wasm artifact.
173
+ pub fn name ( & self ) -> & str {
174
+ & self . name
175
+ }
176
+
177
+ /// The description of this wasm artifact.
178
+ pub fn description ( & self ) -> & str {
179
+ & self . description
180
+ }
181
+ }
182
+
149
183
impl From < momento_protos:: function_types:: Wasm > for Wasm {
150
184
fn from ( proto : momento_protos:: function_types:: Wasm ) -> Self {
151
185
let momento_protos:: function_types:: Wasm {
0 commit comments