Struct embree4_rs::Device
source · pub struct Device { /* private fields */ }
Implementations§
source§impl Device
impl Device
sourcepub fn try_new(config: &str) -> Result<Self>
pub fn try_new(config: &str) -> Result<Self>
Constructs a new Device
using the provided configuration string.
Arguments
config
- A string representing the configuration for the device. See rtcNewDevice for valid configuration values.
Returns
Returns a Result
containing the created Device
if successful, or an error if the device creation fails.
Examples
use embree4_rs::Device;
match Device::try_new("verbose=3,start_threads=1") {
Ok(device) => {
println!("Device created successfully!");
// Use the device...
},
Err(error) => println!("Could not create device: {}", error),
}
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