This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] | |
extern crate serde_derive; | |
extern crate toml; | |
use std::borrow::Cow; | |
use std::fs::File; | |
use std::io::Read; | |
#[derive(Debug, Serialize, Deserialize)] | |
pub struct Config<'a> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def objectproperty(func): | |
"""Alternate version of the standard ``@property`` decorator, | |
useful for proeperties that expose setter (or deleter) in addition to getter. | |
It allows to contain all two/three functions and prevent PEP8 warnings | |
about redefinion of ``x`` when using ``@x.setter`` or ``@x.deleter``. | |
Usage:: |