Skip to content

Commit

Permalink
feat: set
Browse files Browse the repository at this point in the history
  • Loading branch information
JakkuSakura committed May 20, 2024
1 parent 900dfb1 commit 61a976b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/worktable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,14 @@ impl<'a> RowViewMut<'a> {
.unwrap()
}
#[allow(private_bounds)]
pub fn set<T>(&mut self, field: T, value: T::Type)
where
T: WorkTableField,
for<'b> &'b mut T::Type: From<ValueRefMut<'b>>,
{
*self.index_mut(field) = value;
}
#[allow(private_bounds)]
pub fn get_mut<T: ?Sized>(&mut self, column: &str) -> Option<&mut T>
where
for<'b> &'b mut T: From<ValueRefMut<'b>>,
Expand Down

0 comments on commit 61a976b

Please sign in to comment.