pub struct Basalt { /* private fields */ }
Expand description
The main object of this crate.
§Notes
- This is expected to be kept alive for the lifetime of the application.
- There should only ever be one instance of this struct.
Implementations§
source§impl Basalt
impl Basalt
sourcepub fn initialize<F: FnMut(Result<Arc<Self>, String>) + Send + 'static>(
options: BasaltOptions,
result_fn: F
)
pub fn initialize<F: FnMut(Result<Arc<Self>, String>) + Send + 'static>( options: BasaltOptions, result_fn: F )
Begin initializing Basalt, this thread will be taken for window event polling and the
function provided in result_fn
will be executed after Basalt initialization has
completed or errored.
sourcepub fn interval_ref(&self) -> &Arc<Interval>
pub fn interval_ref(&self) -> &Arc<Interval>
Obtain a reference of Arc<Interval>
sourcepub fn interface_ref(&self) -> &Arc<Interface>
pub fn interface_ref(&self) -> &Arc<Interface>
Obtain a reference of Arc<Interface>
sourcepub fn image_cache(&self) -> Arc<ImageCache>
pub fn image_cache(&self) -> Arc<ImageCache>
Obtain a copy of Arc<ImageCache>
sourcepub fn image_cache_ref(&self) -> &Arc<ImageCache>
pub fn image_cache_ref(&self) -> &Arc<ImageCache>
Obtain a refernce of Arc<ImageCache>
sourcepub fn window_manager(&self) -> Arc<WindowManager>
pub fn window_manager(&self) -> Arc<WindowManager>
Obtain a copy of Arc<WindowManager>
sourcepub fn window_manager_ref(&self) -> &Arc<WindowManager>
pub fn window_manager_ref(&self) -> &Arc<WindowManager>
Obtain a reference of Arc<WindowManager>
sourcepub fn instance_ref(&self) -> &Arc<Instance>
pub fn instance_ref(&self) -> &Arc<Instance>
Obtain a reference of Arc<Instance>
sourcepub fn physical_device(&self) -> Arc<PhysicalDevice>
pub fn physical_device(&self) -> Arc<PhysicalDevice>
Obtain a copy of Arc<PhysicalDevice>
sourcepub fn physical_device_ref(&self) -> &Arc<PhysicalDevice>
pub fn physical_device_ref(&self) -> &Arc<PhysicalDevice>
Obtain a reference of Arc<PhysicalDevice>
sourcepub fn device_ref(&self) -> &Arc<Device>
pub fn device_ref(&self) -> &Arc<Device>
Obtain a refernce of Arc<Device>
sourcepub fn graphics_queue(&self) -> Arc<Queue>
pub fn graphics_queue(&self) -> Arc<Queue>
Obtain a copy of the Arc<Queue>
assigned for graphics operations.
sourcepub fn graphics_queue_ref(&self) -> &Arc<Queue>
pub fn graphics_queue_ref(&self) -> &Arc<Queue>
Obtain a reference of the Arc<Queue>
assigned for graphics operations.
sourcepub fn secondary_graphics_queue(&self) -> Option<Arc<Queue>>
pub fn secondary_graphics_queue(&self) -> Option<Arc<Queue>>
Obtain a copy of the Arc<Queue>
assigned for secondary graphics operations.
sourcepub fn secondary_graphics_queue_ref(&self) -> Option<&Arc<Queue>>
pub fn secondary_graphics_queue_ref(&self) -> Option<&Arc<Queue>>
Obtain a reference of the Arc<Queue>
assigned for secondary graphics operations.
sourcepub fn compute_queue(&self) -> Arc<Queue>
pub fn compute_queue(&self) -> Arc<Queue>
Obtain a copy of the Arc<Queue>
assigned for compute operations.
§Notes:
- This queue may be the same as the graphics queue in cases where the device only has a single queue present.
sourcepub fn compute_queue_ref(&self) -> &Arc<Queue>
pub fn compute_queue_ref(&self) -> &Arc<Queue>
Obtain a reference of the Arc<Queue>
assigned for compute operations.
§Notes:
- This queue may be the same as the graphics queue in cases where the device only has a single queue present.
sourcepub fn secondary_compute_queue(&self) -> Option<Arc<Queue>>
pub fn secondary_compute_queue(&self) -> Option<Arc<Queue>>
Obtain a copy of the Arc<Queue>
assigned for secondary compute operations.
sourcepub fn secondary_compute_queue_ref(&self) -> Option<&Arc<Queue>>
pub fn secondary_compute_queue_ref(&self) -> Option<&Arc<Queue>>
Obtain a reference of the Arc<Queue>
assigned for secondary compute operations.
sourcepub fn transfer_queue(&self) -> Arc<Queue>
pub fn transfer_queue(&self) -> Arc<Queue>
Obtain a copy of the Arc<Queue>
assigned for transfers.
§Notes:
- This queue may be the same as the compute queue in cases where the device only has two queues present. In cases where there is only one queue the graphics, compute, and transfer queues will all be the same queue.
sourcepub fn transfer_queue_ref(&self) -> &Arc<Queue>
pub fn transfer_queue_ref(&self) -> &Arc<Queue>
Obtain a reference of the Arc<Queue>
assigned for transfers.
§Notes:
- This queue may be the same as the compute queue in cases where the device only has two queues present. In cases where there is only one queue the graphics, compute, and transfer queues will all be the same queue.
sourcepub fn secondary_transfer_queue(&self) -> Option<Arc<Queue>>
pub fn secondary_transfer_queue(&self) -> Option<Arc<Queue>>
Obtain a copy of the Arc<Queue>
assigned for secondary transfers.
sourcepub fn secondary_transfer_queue_ref(&self) -> Option<&Arc<Queue>>
pub fn secondary_transfer_queue_ref(&self) -> Option<&Arc<Queue>>
Obtain a reference of the Arc<Queue>
assigned for secondary transfers.
sourcepub fn wants_exit(&self) -> bool
pub fn wants_exit(&self) -> bool
Check if basalt is attempting to exit.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Basalt
impl !RefUnwindSafe for Basalt
impl Send for Basalt
impl Sync for Basalt
impl Unpin for Basalt
impl !UnwindSafe for Basalt
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more