pub struct Target { /* private fields */ }Implementations§
Source§impl Target
impl Target
pub async fn new( instance: Arc<Instance>, window: Arc<Window>, device_storage: DeviceStorage, ) -> Self
pub async fn new_headless( instance: Arc<Instance>, device_storage: DeviceStorage, ) -> Self
Sourcepub fn compatible_with(&self, other: &Target) -> bool
pub fn compatible_with(&self, other: &Target) -> bool
check if objects created with self target
can be used with the other target
pub fn get_frame(&mut self) -> Frame
pub fn finish_frame(&mut self, frame: Frame)
pub fn set_vsync(&mut self, on: bool)
pub fn get_vsync(&self) -> Option<bool>
pub fn get_window(&self) -> Option<Arc<Window>>
pub fn get_format(&self) -> TextureFormat
pub fn get_device(&self) -> Arc<Device>
pub fn catch_error<T, F: FnOnce(&Self) -> T>(&self, f: F) -> Result<T, String>
Auto Trait Implementations§
impl !Freeze for Target
impl !RefUnwindSafe for Target
impl Send for Target
impl !Sync for Target
impl Unpin for Target
impl !UnwindSafe for Target
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
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>
Converts
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>
Converts
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