Skip to main content

surrealdb_expr/expr/convert/
file.rs

1//! `sql` -> `expr` conversions for [`crate::sql::file`].
2//!
3//! Lives in core rather than beside the AST: `surrealdb-sql` sits below
4//! core, so it cannot name `expr` types.
5
6use crate::sql::file::*;
7
8impl From<File> for crate::val::File {
9	fn from(v: File) -> Self {
10		Self {
11			bucket: v.bucket,
12			key: v.key,
13		}
14	}
15}
16
17impl From<crate::val::File> for File {
18	fn from(v: crate::val::File) -> Self {
19		Self {
20			bucket: v.bucket,
21			key: v.key,
22		}
23	}
24}