pub struct AnyRepository<T> { /* private fields */ }Expand description
Stateless marker type #[derive(Model)] implements
larust_repository::Repository<T> for - see larust-macros’ model.rs
for the actual generated impl Repository<T> for AnyRepository<T> body,
which just forwards to the already-generated T::find/create/update/
delete static methods and QueryBuilder<T>.
This can’t be a single blanket impl<T: FromRow<AnyRow>> Repository<T> for AnyRepository<T> written once here in larust-orm, because
create/update need to build INSERT/UPDATE SQL text from a specific
struct’s column names - information only available at macro-expansion
time (#[derive(Model)] sees the real field list; a function generic
over T here never does). So the impl is generated per-model instead,
and this type stays a plain, zero-sized marker with no logic of its own.
Implementations§
Source§impl<T> AnyRepository<T>
impl<T> AnyRepository<T>
pub fn new() -> AnyRepository<T>
Trait Implementations§
Source§impl<T> Default for AnyRepository<T>
impl<T> Default for AnyRepository<T>
Source§fn default() -> AnyRepository<T>
fn default() -> AnyRepository<T>
Auto Trait Implementations§
impl<T> Freeze for AnyRepository<T>
impl<T> RefUnwindSafe for AnyRepository<T>
impl<T> Send for AnyRepository<T>
impl<T> Sync for AnyRepository<T>
impl<T> Unpin for AnyRepository<T>
impl<T> UnsafeUnpin for AnyRepository<T>
impl<T> UnwindSafe for AnyRepository<T>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more