[−][src]Struct rebuilderd::models::Worker
Fields
id: i32
key: String
addr: String
status: Option<String>
last_ping: NaiveDateTime
online: bool
Implementations
impl Worker
[src]
pub fn get(
my_key: &str,
connection: &SqliteConnection
) -> Result<Option<Worker>>
[src]
my_key: &str,
connection: &SqliteConnection
) -> Result<Option<Worker>>
pub fn list(connection: &SqliteConnection) -> Result<Vec<Worker>>
[src]
pub fn mark_stale_workers_offline(connection: &SqliteConnection) -> Result<()>
[src]
pub fn bump_last_ping(&mut self, addr: &IpAddr)
[src]
pub fn update(&self, connection: &SqliteConnection) -> Result<()>
[src]
Trait Implementations
impl<'update> AsChangeset for &'update Worker
[src]
type Target = table
The table which Self::Changeset
will be updating
type Changeset = <(Eq<key, &'update String>, Eq<addr, &'update String>, Option<Eq<status, &'update String>>, Eq<last_ping, &'update NaiveDateTime>, Eq<online, &'update bool>) as AsChangeset>::Changeset
The update statement this type represents
pub fn as_changeset(self) -> Self::Changeset
[src]
impl<'update> AsChangeset for Worker
[src]
type Target = table
The table which Self::Changeset
will be updating
type Changeset = <(Eq<key, String>, Eq<addr, String>, Option<Eq<status, String>>, Eq<last_ping, NaiveDateTime>, Eq<online, bool>) as AsChangeset>::Changeset
The update statement this type represents
pub fn as_changeset(self) -> Self::Changeset
[src]
impl Debug for Worker
[src]
impl From<Worker> for Worker
[src]
impl HasTable for Worker
[src]
impl<'ident> Identifiable for &'ident Worker
[src]
type Id = &'ident i32
The type of this struct's identifier. Read more
pub fn id(self) -> Self::Id
[src]
impl PartialEq<Worker> for Worker
[src]
impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Worker where
(i32, String, String, Option<String>, NaiveDateTime, bool): Queryable<__ST, __DB>,
[src]
(i32, String, String, Option<String>, NaiveDateTime, bool): Queryable<__ST, __DB>,
type Row = <(i32, String, String, Option<String>, NaiveDateTime, bool) as Queryable<__ST, __DB>>::Row
The Rust type you'd like to map from. Read more
pub fn build(row: Self::Row) -> Self
[src]
impl Serialize for Worker
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Worker
[src]
Auto Trait Implementations
impl RefUnwindSafe for Worker
impl Send for Worker
impl Sync for Worker
impl Unpin for Worker
impl UnwindSafe for Worker
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoSql for T
[src]
pub fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
pub fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,