Function embed_plist::get_info_plist [−][src]
pub fn get_info_plist() -> &'static [u8]
Expand description
Returns the contents of the embedded Info.plist
file.
Examples
We can verify that the result is correct by checking it against the file at runtime:
embed_plist::embed_info_plist!("Info.plist");
let embedded_plist = embed_plist::get_info_plist();
let read_plist = std::fs::read("Info.plist")?;
assert_eq!(embedded_plist, read_plist.as_slice());
If embed_info_plist!
has not been called, this function creates a
compile-time error by failing to reference the symbol defined by that macro:
ⓘ
let embedded_plist = embed_plist::get_info_plist();
Safety
This function relies on _EMBED_INFO_PLIST
being defined within the
__TEXT,__info_plist
section. You should not define this symbol outside
of using the macros provided by this library.