Skip to content

Commit

Permalink
Add methods for accessing Struct Values (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstoza authored Feb 29, 2024
1 parent 7205da9 commit 49aae13
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/rune/src/runtime/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,16 @@ impl Value {
into_tuple,
}

into! {
/// Coerce into [`Struct`]
Struct(Struct),
into_struct_ref,
into_struct_mut,
borrow_struct_ref,
borrow_struct_mut,
into_struct,
}

into! {
/// Coerce into a [`Object`].
Object(Object),
Expand Down

0 comments on commit 49aae13

Please sign in to comment.