#[repr(C)]pub struct NSBundle {
pub ptr: Id<Object>,
}
Expand description
A representation of the code and resources stored in a bundle directory on disk.
Fields§
§ptr: Id<Object>
The raw pointer to the Objective-C object.
Implementations§
Source§impl NSBundle
impl NSBundle
Sourcepub fn main_bundle() -> NSBundle
pub fn main_bundle() -> NSBundle
Returns the bundle object that contains the current executable.
Sourcepub fn all_frameworks() -> NSArray<NSBundle>
pub fn all_frameworks() -> NSArray<NSBundle>
Returns an array of all of the application’s bundles that represent frameworks.
Sourcepub fn all_bundles() -> NSArray<NSBundle>
pub fn all_bundles() -> NSArray<NSBundle>
Returns an array of all the application’s non-framework bundles.
Sourcepub fn resource_path(&self) -> NSString
pub fn resource_path(&self) -> NSString
The full pathname of the bundle’s subdirectory containing resources.
Sourcepub fn executable_path(&self) -> NSString
pub fn executable_path(&self) -> NSString
The full pathname of the receiver’s executable file.
Sourcepub fn bundle_path(&self) -> NSString
pub fn bundle_path(&self) -> NSString
The full pathname of the receiver’s bundle directory.
Sourcepub fn bundle_identifier(&self) -> NSString
pub fn bundle_identifier(&self) -> NSString
The receiver’s bundle identifier.
Sourcepub fn info_dictionary(&self) -> NSDictionary<NSString, id>
pub fn info_dictionary(&self) -> NSDictionary<NSString, id>
A dictionary, constructed from the bundle’s Info.plist file, that contains information about the receiver.
Methods from Deref<Target = Object>§
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.