pub struct PgIdSpaceGenerator { /* private fields */ }Implementations§
Source§impl PgIdSpaceGenerator
impl PgIdSpaceGenerator
pub fn new(pool: Pool) -> Self
pub fn from_executor(executor: PgMutationExecutor) -> Self
pub fn with_table_name(self, table_name: impl Into<String>) -> Self
pub async fn ensure_table(&self) -> Result<(), MutationExecutorError>
pub async fn next_id(&self, entity: &str) -> Result<u64, MutationExecutorError>
Trait Implementations§
Source§impl Clone for PgIdSpaceGenerator
impl Clone for PgIdSpaceGenerator
Source§fn clone(&self) -> PgIdSpaceGenerator
fn clone(&self) -> PgIdSpaceGenerator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl InternalIdGenerator for PgIdSpaceGenerator
impl InternalIdGenerator for PgIdSpaceGenerator
fn generate_id(&self, entity: &str) -> Result<u64, RuntimeError>
Auto Trait Implementations§
impl !RefUnwindSafe for PgIdSpaceGenerator
impl !UnwindSafe for PgIdSpaceGenerator
impl Freeze for PgIdSpaceGenerator
impl Send for PgIdSpaceGenerator
impl Sync for PgIdSpaceGenerator
impl Unpin for PgIdSpaceGenerator
impl UnsafeUnpin for PgIdSpaceGenerator
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