[−][src]Struct freedesktop_categories_codegen::DesktopMenuSpec
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
Auto Trait Implementations
impl Send for DesktopMenuSpec
impl Sync for DesktopMenuSpec
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,