#[non_exhaustive]pub struct SqliteChangeEvent<'a> {
pub op: SqliteChangeOp,
pub db_name: &'a str,
pub table_name: &'a str,
pub rowid: i64,
}__sqlite-shared only.Expand description
Describes a single row change event from SQLite.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.op: SqliteChangeOpThe operation that triggered this event.
db_name: &'a strThe name of the database the change occurred in: "main" for the
primary database, "temp" for temporary tables, or the alias from an
ATTACH DATABASE statement.
table_name: &'a strThe name of the table that was modified.
rowid: i64SQLite’s internal 64-bit rowid
of the affected row. For an INTEGER PRIMARY KEY table this equals the
primary key, otherwise it is a separate hidden value.
Implementations§
Source§impl SqliteChangeEvent<'_>
impl SqliteChangeEvent<'_>
Sourcepub fn is_from(&self, table: impl NamedTable) -> bool
pub fn is_from(&self, table: impl NamedTable) -> bool
Returns true if this change is on the table!
table T, comparing table_name against T’s
name. Lets a callback match a typed table marker instead of a string
literal:
if change.is_from(users::table) { /* ... */ }Only the table name is compared, not the database, so a same-named
table in an ATTACH-ed database also matches. Inspect
db_name if you need to tell them apart.
Trait Implementations§
Source§impl<'a> Clone for SqliteChangeEvent<'a>
impl<'a> Clone for SqliteChangeEvent<'a>
Source§fn clone(&self) -> SqliteChangeEvent<'a>
fn clone(&self) -> SqliteChangeEvent<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for SqliteChangeEvent<'a>
Auto Trait Implementations§
impl<'a> Freeze for SqliteChangeEvent<'a>
impl<'a> RefUnwindSafe for SqliteChangeEvent<'a>
impl<'a> Send for SqliteChangeEvent<'a>
impl<'a> Sync for SqliteChangeEvent<'a>
impl<'a> Unpin for SqliteChangeEvent<'a>
impl<'a> UnsafeUnpin for SqliteChangeEvent<'a>
impl<'a> UnwindSafe for SqliteChangeEvent<'a>
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
Source§fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.