File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,30 @@ impl MutationTable {
320
320
let ri = r. into ( ) . 0 ;
321
321
table_row_access ! ( ri, self , make_mutation_table_row)
322
322
}
323
+
324
+ /// Return a view of row `r` of the table.
325
+ ///
326
+ /// # Parameters
327
+ ///
328
+ /// * `r`: the row id.
329
+ ///
330
+ /// # Returns
331
+ ///
332
+ /// * `Some(row view)` if `r` is valid
333
+ /// * `None` otherwise
334
+ pub fn row_view < M : Into < MutationId > + Copy > ( & self , r : M ) -> Option < MutationTableRowView > {
335
+ let view = MutationTableRowView {
336
+ table : self ,
337
+ id : r. into ( ) ,
338
+ site : self . site ( r) ?,
339
+ node : self . node ( r) ?,
340
+ parent : self . parent ( r) ?,
341
+ time : self . time ( r) ?,
342
+ derived_state : self . derived_state ( r) ,
343
+ metadata : self . raw_metadata ( r. into ( ) ) ,
344
+ } ;
345
+ Some ( view)
346
+ }
323
347
}
324
348
325
349
build_owned_table_type ! (
You can’t perform that action at this time.
0 commit comments