pub trait EntBuilder {
type Output: Ent;
type Error;
// Required methods
fn finish(self) -> Result<Self::Output, Self::Error>;
fn finish_and_commit(
self,
) -> Result<DatabaseResult<Self::Output>, Self::Error>;
}Expand description
Represents a builder interface for some ent, capable of building a new ent instance and also saving the new ent to the database at the same time
Required Associated Types§
Required Methods§
Sourcefn finish(self) -> Result<Self::Output, Self::Error>
fn finish(self) -> Result<Self::Output, Self::Error>
Consumes the builder and creates a new instance of the ent
Sourcefn finish_and_commit(self) -> Result<DatabaseResult<Self::Output>, Self::Error>
fn finish_and_commit(self) -> Result<DatabaseResult<Self::Output>, Self::Error>
Consumes the builder, creates a new instance of the ent, and saves it to the database referenced by the ent