If you've put the whole schema into a single .query() statement there should be quite a few responses generated. You can quickly debug the whole thing (each response will have its own index number), use .num_statements to get the total length handle them one at a time,
https://docs.rs/surrealdb/latest/surrealdb/struct.Response.html#method.num_statements
or use this method to take out the errors and handle Ok responses vs. Errs.
https://docs.rs/surrealdb/latest/surrealdb/struct.Response.html#method.take_errors
If still unsure I would just copy paste the whole schema into a &str and stick that in, see if that works and if so then work bit by bit to what you have with the bytes into a &str one step at a time and see if anything stands out.
And for the quickest iteration and without needing to connect to anything remote you can do the whole thing in memory to start:
let db = connect("memory")
and go from there.