Download libraries/arrow-convert/src/lib.rs from opencsg/csg-robomaster: direct link, hf CLI and curl.
- Browser
- Download file 485 Bytes
-
https://huggingface.co/datasets/opencsg/csg-robomaster/resolve/main/libraries/arrow-convert/src/lib.rs
- Command line
-
hf download hf://datasets/opencsg/csg-robomaster/libraries/arrow-convert/src/lib.rs
-
curl -L -o lib.rs https://huggingface.co/datasets/opencsg/csg-robomaster/resolve/main/libraries/arrow-convert/src/lib.rs
485 Bytes
| use std::ops::{Deref, DerefMut}; | |
| use arrow::array::Array; | |
| mod from_impls; | |
| mod into_impls; | |
| pub trait IntoArrow { | |
| type A: Array; | |
| fn into_arrow(self) -> Self::A; | |
| } | |
| pub struct ArrowData(pub arrow::array::ArrayRef); | |
| impl Deref for ArrowData { | |
| type Target = arrow::array::ArrayRef; | |
| fn deref(&self) -> &Self::Target { | |
| &self.0 | |
| } | |
| } | |
| impl DerefMut for ArrowData { | |
| fn deref_mut(&mut self) -> &mut Self::Target { | |
| &mut self.0 | |
| } | |
| } | |