pub struct Map { /* private fields */ }Expand description
Maps attribute names to columns through a table; other names stay as they are.
PHP: Utopia\Query\Hook\Attribute\Map.
use utopia_query::hook::{Attribute, Map};
let map = Map::new([("$id", "_uid")]);
assert_eq!(map.resolve("$id")?, "_uid");
assert_eq!(map.resolve("name")?, "name");use Utopia\Query\Hook\Attribute\Map;
$map = new Map(['$id' => '_uid']);
echo $map->resolve('$id'), "\n"; // _uid
echo $map->resolve('name'), "\n"; // nameImplementations§
Trait Implementations§
impl StructuralPartialEq for Map
Auto Trait Implementations§
impl Forget for Map
impl Freeze for Map
impl Move for Map
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnsafeUnpin for Map
impl UnwindSafe for Map
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more