//! This example demonstrates reading a csv string to a [`Table`] struct. //! //! * Note the necessary step of representing the string as a byte array. fn main() { let syscalls = "\ 0,INDIR,,\"int sys_syscall(int number, ...)\"\n\ 1,STD,,\"void sys_exit(int rval)\"\n\ 2,STD,,\"int sys_fork(void)\"\n\ 3,STD,NOLOCK,\"ssize_t sys_read(int fd, void *buf, size_t nbyte)\"\n\ 4,STD,NOLOCK,\"ssize_t sys_write(int fd, const void *buf, size_t nbyte)\""; let table = csv_to_table::from_reader(syscalls.as_bytes()).unwrap(); println!("{table}") }