[][src]Struct rebuilderd::models::Worker

pub struct Worker {
    pub id: i32,
    pub key: String,
    pub addr: String,
    pub status: Option<String>,
    pub last_ping: NaiveDateTime,
    pub online: bool,
}

Fields

id: i32key: Stringaddr: Stringstatus: Option<String>last_ping: NaiveDateTimeonline: bool

Implementations

impl Worker[src]

pub fn get(
    my_key: &str,
    connection: &SqliteConnection
) -> Result<Option<Worker>>
[src]

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

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

impl Debug for Worker[src]

impl From<Worker> for Worker[src]

impl HasTable for Worker[src]

type Table = table

The table this type is associated with.

impl<'ident> Identifiable for &'ident Worker[src]

type Id = &'ident i32

The type of this struct's identifier. Read more

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]

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

impl Serialize for Worker[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoSql for T[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,