Struct embree4_rs::Device
source · pub struct Device { /* private fields */ }
Implementations§
source§impl Device
impl Device
sourcepub fn try_new(config: Option<&str>) -> Result<Self>
pub fn try_new(config: Option<&str>) -> Result<Self>
Constructs a new Device
using the provided configuration string.
Arguments
config
- A string representing the configuration for the device. Can be an empty string. See rtcNewDevice for valid configuration values.
Returns
A Result
containing the created Device
if successful, or an error if the device creation fails.
Examples
use embree4_rs::Device;
let device = Device::try_new(Some("verbose=1")).unwrap();
// Use the device...
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Device
impl !Send for Device
impl !Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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