use arrow2::buffer::Buffer; use arrow2::types::NativeType; fn main() { // Create a buffer with some data let data: Vec<i32> = vec![1, 2, 3, 4, 5]; let buffer = Buffer::from(data); // Convert the buffer into an array let array = buffer.into_array(); // Print the array println!("{:?}", array); }
Write, Run & Share Rust code online using OneCompiler's Rust online compiler for free. It's one of the robust, feature-rich online compilers for Rust language. Getting started with the OneCompiler's Rust editor is easy and fast. The editor shows sample boilerplate code when you choose language as Rust and start coding.