[−][src]Struct cortex::models::Task
A CorTeX
task, for a given corpus-service pair
Fields
id: i64
task primary key, auto-incremented by postgresql
service_id: i32
id of the service owning this task
corpus_id: i32
id of the corpus hosting this task
status: i32
current processing status of this task
entry: String
entry path on the file system
Implementations
impl Task
[src]
pub fn delete_by_entry(&self, connection: &PgConnection) -> Result<usize, Error>
[src]
Delete task by entry
pub fn delete_by_service_id(
&self,
connection: &PgConnection
) -> Result<usize, Error>
[src]
&self,
connection: &PgConnection
) -> Result<usize, Error>
Delete all tasks matching this task's service id
pub fn delete_by_id(&self, connection: &PgConnection) -> Result<usize, Error>
[src]
Delete task by id
pub fn find(taskid: i64, connection: &PgConnection) -> Result<Task, Error>
[src]
Find task by id, error if none
pub fn find_by_entry(
entry: &str,
connection: &PgConnection
) -> Result<Task, Error>
[src]
entry: &str,
connection: &PgConnection
) -> Result<Task, Error>
Find task by entry, error if none
pub fn find_by_name(
name: &str,
corpus: &Corpus,
service: &Service,
connection: &PgConnection
) -> Result<Task, Error>
[src]
name: &str,
corpus: &Corpus,
service: &Service,
connection: &PgConnection
) -> Result<Task, Error>
Find task by name-suffix of an entry, error if none
Trait Implementations
impl<'update> AsChangeset for &'update Task
[src]
type Target = table
The table which Self::Changeset
will be updating
type Changeset = <(Eq<service_id, &'update i32>, Eq<corpus_id, &'update i32>, Eq<status, &'update i32>, Eq<entry, &'update String>) as AsChangeset>::Changeset
The update statement this type represents
fn as_changeset(self) -> Self::Changeset
[src]
impl<'update> AsChangeset for Task
[src]
type Target = table
The table which Self::Changeset
will be updating
type Changeset = <(Eq<service_id, i32>, Eq<corpus_id, i32>, Eq<status, i32>, Eq<entry, String>) as AsChangeset>::Changeset
The update statement this type represents
fn as_changeset(self) -> Self::Changeset
[src]
impl<__FK> BelongsTo<Task> for LogInfo where
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
[src]
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = task_id
The database column representing the foreign key of the table this struct represents Read more
fn foreign_key(&self) -> Option<&Self::ForeignKey>
[src]
fn foreign_key_column() -> Self::ForeignKeyColumn
[src]
impl<__FK> BelongsTo<Task> for LogWarning where
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
[src]
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = task_id
The database column representing the foreign key of the table this struct represents Read more
fn foreign_key(&self) -> Option<&Self::ForeignKey>
[src]
fn foreign_key_column() -> Self::ForeignKeyColumn
[src]
impl<__FK> BelongsTo<Task> for LogError where
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
[src]
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = task_id
The database column representing the foreign key of the table this struct represents Read more
fn foreign_key(&self) -> Option<&Self::ForeignKey>
[src]
fn foreign_key_column() -> Self::ForeignKeyColumn
[src]
impl<__FK> BelongsTo<Task> for LogFatal where
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
[src]
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = task_id
The database column representing the foreign key of the table this struct represents Read more
fn foreign_key(&self) -> Option<&Self::ForeignKey>
[src]
fn foreign_key_column() -> Self::ForeignKeyColumn
[src]
impl<__FK> BelongsTo<Task> for LogInvalid where
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
[src]
__FK: Hash + Eq,
&'__a i64: Into<Option<&'__a __FK>>,
&'__a Task: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = task_id
The database column representing the foreign key of the table this struct represents Read more
fn foreign_key(&self) -> Option<&Self::ForeignKey>
[src]
fn foreign_key_column() -> Self::ForeignKeyColumn
[src]
impl Clone for Task
[src]
impl CortexDeletable for Task
[src]
impl Debug for Task
[src]
impl Eq for Task
[src]
impl HasTable for Task
[src]
impl<'ident> Identifiable for &'ident Task
[src]
impl PartialEq<Task> for Task
[src]
impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Task where
(i64, i32, i32, i32, String): Queryable<__ST, __DB>,
[src]
(i64, i32, i32, i32, String): Queryable<__ST, __DB>,
type Row = <(i64, i32, i32, i32, String) as Queryable<__ST, __DB>>::Row
The Rust type you'd like to map from. Read more
fn build(row: Self::Row) -> Self
[src]
impl<__DB: Backend> QueryableByName<__DB> for Task where
i64: FromSql<SqlTypeOf<id>, __DB>,
i32: FromSql<SqlTypeOf<service_id>, __DB>,
i32: FromSql<SqlTypeOf<corpus_id>, __DB>,
i32: FromSql<SqlTypeOf<status>, __DB>,
String: FromSql<SqlTypeOf<entry>, __DB>,
[src]
i64: FromSql<SqlTypeOf<id>, __DB>,
i32: FromSql<SqlTypeOf<service_id>, __DB>,
i32: FromSql<SqlTypeOf<corpus_id>, __DB>,
i32: FromSql<SqlTypeOf<status>, __DB>,
String: FromSql<SqlTypeOf<entry>, __DB>,
impl StructuralEq for Task
[src]
impl StructuralPartialEq for Task
[src]
Auto Trait Implementations
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
&'a Self: AsExpression<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,