pub struct DesktopMenuSpec { /* private fields */ }
Expand description
Specification parser and code generator.
Implementations§
Source§impl DesktopMenuSpec
impl DesktopMenuSpec
Sourcepub fn xml_cache_dir<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self
pub fn xml_cache_dir<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self
Overrides the path where the XML file should be downloaded and cached.
This value is $OUT_DIR
by default.
Sourcepub fn always_download(&mut self, value: bool) -> &mut Self
pub fn always_download(&mut self, value: bool) -> &mut Self
Always download the XML file again, even if it is already present in the cache.
This value is false
by default.
Sourcepub fn output_file_name(&mut self, name: &'static str) -> &mut Self
pub fn output_file_name(&mut self, name: &'static str) -> &mut Self
Sets the name of the Rust output file. This name should include a .rs
extension suffix.
This value is map.rs
by default.
Sourcepub fn version(&mut self, ver: Version) -> &mut Self
pub fn version(&mut self, ver: Version) -> &mut Self
Specifies which version of the spec we wish to generate.
This value is Version::Latest
by default.
Sourcepub fn gen_static_map(&self) -> Result<(), Error>
pub fn gen_static_map(&self) -> Result<(), Error>
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 Freeze for DesktopMenuSpec
impl RefUnwindSafe for DesktopMenuSpec
impl Send for DesktopMenuSpec
impl Sync for DesktopMenuSpec
impl Unpin for DesktopMenuSpec
impl UnwindSafe for DesktopMenuSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more