[][src]Struct freedesktop_categories_codegen::DesktopMenuSpec

pub struct DesktopMenuSpec { /* fields omitted */ }

Specification parser and code generator.

Methods

impl DesktopMenuSpec[src]

pub fn new() -> Self[src]

Creates a new code generator.

pub fn xml_cache_dir<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self[src]

Overrides the path where the XML file should be downloaded and cached.

This value is $OUT_DIR by default.

pub fn always_download(&mut self, value: bool) -> &mut Self[src]

Always download the XML file again, even if it is already present in the cache.

This value is false by default.

pub fn output_file_name(&mut self, name: &'static str) -> &mut Self[src]

Sets the name of the Rust output file. This name should include a .rs extension suffix.

This value is map.rs by default.

pub fn version(&mut self, ver: Version) -> &mut Self[src]

Specifies which version of the spec we wish to generate.

This value is Version::Latest by default.

pub fn gen_static_map(&self) -> Result<(), Error>[src]

Generates a static hash map of application categories and saves it to a file.

Returns Ok(()) if successful, returns Err(Error) otherwise.

Trait Implementations

impl Debug for DesktopMenuSpec[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.