You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered this yesterday. Wrote an impl method like so:
For a lot of simple structs, we can deserialize from an R list object directly into that struct. This is very handy if we want to be able to accept R objects like lists instead of having to create external pointers to structs
use extendr_api::prelude::*;use extendr_api::deserializer::from_robj;use ast_grep_config::SerializableRule;pubfnnew_rule(pattern:Robj) -> SerializableRule{let r:SerializableRule = from_robj(&pattern).unwrap();
r
}
The text was updated successfully, but these errors were encountered:
Discovered this yesterday. Wrote an impl method like so:
For a lot of simple structs, we can deserialize from an R list object directly into that struct. This is very handy if we want to be able to accept R objects like lists instead of having to create external pointers to structs
The text was updated successfully, but these errors were encountered: