Skip to main content

create

Macro create 

Source
macro_rules! create {
    ($trx:expr, $ty:ident { $($tt:tt)* }) => { ... };
}
Expand description

Macro for creating entities with automatic .into() on fields.

Combines a transaction’s create call with the into! macro:

use ankurah::create;

// This:
create!(trx, ConnectionEvent { &user, session: &session_view, timestamp: ts })

// Expands to:
trx.create(&into!(ConnectionEvent { &user, session: &session_view, timestamp: ts }))