use super::Error;
pub struct Bundle {
inner: metal_rust_ffi::Bundle,
}
impl Bundle {
pub(crate) const fn as_ffi(&self) -> &metal_rust_ffi::Bundle {
&self.inner
}
#[must_use]
pub fn main() -> Self {
Self {
inner: metal_rust_ffi::Bundle::main(),
}
}
pub fn load(&self) -> Result<(), Error> {
self.inner.load().map_err(Error::from_ffi)
}
#[must_use]
pub fn is_loaded(&self) -> bool {
self.inner.is_loaded()
}
}