pass_single_logical: Flips a logical value in Rust

Description Usage Arguments Details Value Examples

View source: R/extendr-wrappers.R

Description

Demonstrates passing a logical (boolean) value back and forth between R and Rust, flipping the value in Rust to prove it works.

Usage

1

Arguments

b

A logical (boolean) value to treat as a bool in Rust

Details

The value passed to this function must be a logical, the boolean type in R, or an NA (plain NA is logical). The Rust function signature is fn pass_single_logical_fn(b: Option<bool>) -> Option<bool>, with NA's being handled as None in Rust.

Value

!b

Examples

1
2

ericwburden/rustbind documentation built on April 10, 2021, 12:31 p.m.