Struct medal::config::Opt

source ·
struct Opt {
Show 15 fields pub configfile: PathBuf, pub databasefile: Option<PathBuf>, pub databaseurl: Option<String>, pub port: Option<u16>, pub template: Option<String>, pub resetadminpw: bool, pub nocontestscan: bool, pub onlycontestscan: bool, pub openbrowser: bool, pub disableresultspage: bool, pub enablepasswordlogin: bool, pub teacherpage: Option<String>, pub logtiming: bool, pub autosaveinterval: Option<u64>, pub version: bool,
}

Fields§

§configfile: PathBuf

Config file to use (default: ‘config.json’)

§databasefile: Option<PathBuf>

Database file to use (default: from config file or ‘medal.db’)

§databaseurl: Option<String>

Database file to use (default: from config file or ‘medal.db’)

§port: Option<u16>

Port to listen on (default: from config file or 8080)

§template: Option<String>

Teacher page in task directory

§resetadminpw: bool

Reset password of admin user (user_id=1)

§nocontestscan: bool

Run medal without scanning for contests

§onlycontestscan: bool

Scan for contests without starting medal

§openbrowser: bool

Automatically open medal in the default browser

§disableresultspage: bool

Disable results page to reduce load on the server

§enablepasswordlogin: bool

Enable the login with username and password

§teacherpage: Option<String>

Teacher page in task directory

§logtiming: bool

Log response time of every request

§autosaveinterval: Option<u64>

Auto save interval in seconds (defaults to 10)

§version: bool

Show version

Trait Implementations§

source§

impl Debug for Opt

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl StructOpt for Opt

source§

fn clap<'a, 'b>() -> App<'a, 'b>

Returns the corresponding clap::App.
source§

fn from_clap(matches: &ArgMatches<'_>) -> Self

Creates the struct from clap::ArgMatches. It cannot fail with a parameter generated by clap by construction.
§

fn from_args() -> Self
where Self: Sized,

Gets the struct from the command line arguments. Print the error message and quit the program in case of failure.
§

fn from_iter<I>(iter: I) -> Self
where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure.
§

fn from_iter_safe<I>(iter: I) -> Result<Self, Error>
where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations§

§

impl Freeze for Opt

§

impl RefUnwindSafe for Opt

§

impl Send for Opt

§

impl Sync for Opt

§

impl Unpin for Opt

§

impl UnwindSafe for Opt

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T> AsTaggedExplicit<'a> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self>

§

impl<'a, T> AsTaggedImplicit<'a> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PersistentInto<Arc<Mutex<T>>> for T

§

fn persistent_into(self) -> Arc<Mutex<T>>

Convert self into a value of type T.
§

impl<T> PersistentInto<Arc<RwLock<T>>> for T

§

fn persistent_into(self) -> Arc<RwLock<T>>

Convert self into a value of type T.
§

impl<T> PersistentInto<Arc<T>> for T

§

fn persistent_into(self) -> Arc<T>

Convert self into a value of type T.
§

impl<T> PersistentInto<T> for T

§

fn persistent_into(self) -> T

Convert self into a value of type T.
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>

§

impl<T> Typeable for T
where T: Any,

§

fn get_type(&self) -> TypeId

Get the TypeId of this object.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> DebugAny for T
where T: Any + Debug,

§

impl<T> UnsafeAny for T
where T: Any,