[][src]Struct cortex::models::Service

pub struct Service {
    pub id: i32,
    pub name: String,
    pub version: f32,
    pub inputformat: String,
    pub outputformat: String,
    pub inputconverter: Option<String>,
    pub complex: bool,
    pub description: String,
}

A CorTeX processing service

Fields

id: i32

auto-incremented postgres id

name: String

a human-readable name

version: f32

a floating-point number to mark the current version (e.g. 0.01)

inputformat: String

the expected input format (e.g. tex)

outputformat: String

the produced output format (e.g. html)

inputconverter: Option<String>

prerequisite input conversion service, if any

complex: bool

is this service requiring more than the main textual content of a document? mark "true" if unsure

description: String

a human-readable description

Implementations

impl Service[src]

pub fn find_by_name(
    name_query: &str,
    connection: &PgConnection
) -> Result<Service, Error>
[src]

ORM-like until diesel.rs introduces finders for more fields

pub fn to_hash(&self) -> HashMap<String, String>[src]

Returns a hash representation of the Service, usually for frontend reports

pub fn select_workers(
    &self,
    connection: &PgConnection
) -> Result<Vec<WorkerMetadata>, Error>
[src]

Return a vector of services currently activated on this corpus

Trait Implementations

impl<'update> AsChangeset for &'update Service[src]

type Target = table

The table which Self::Changeset will be updating

type Changeset = <(Eq<name, &'update String>, Eq<version, &'update f32>, Eq<inputformat, &'update String>, Eq<outputformat, &'update String>, Option<Eq<inputconverter, &'update String>>, Eq<complex, &'update bool>, Eq<description, &'update String>) as AsChangeset>::Changeset

The update statement this type represents

impl<'update> AsChangeset for Service[src]

type Target = table

The table which Self::Changeset will be updating

type Changeset = <(Eq<name, String>, Eq<version, f32>, Eq<inputformat, String>, Eq<outputformat, String>, Option<Eq<inputconverter, String>>, Eq<complex, bool>, Eq<description, String>) as AsChangeset>::Changeset

The update statement this type represents

impl Clone for Service[src]

impl Debug for Service[src]

impl HasTable for Service[src]

type Table = table

The table this type is associated with.

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

type Id = &'ident i32

The type of this struct's identifier. Read more

impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Service where
    (i32, String, f32, String, String, Option<String>, bool, String): Queryable<__ST, __DB>, 
[src]

type Row = <(i32, String, f32, String, String, Option<String>, bool, String) as Queryable<__ST, __DB>>::Row

The Rust type you'd like to map from. Read more

Auto Trait Implementations

impl RefUnwindSafe for Service

impl Send for Service

impl Sync for Service

impl Unpin for Service

impl UnwindSafe for Service

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, I> AsResult<T, I> for T where
    I: Input, 

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoCollection<T> for T

impl<T> IntoSql for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<T> Typeable for T where
    T: Any

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