MCPcopy Create free account
hub / github.com/Recordscript/recordscript / next

Method next

libs/scrap/src/dxgi/mod.rs:540–562  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

538impl Iterator for Displays {
539 type Item = Display;
540 fn next(&mut self) -> Option<Display> {
541 if let Some(res) = self.read_and_invalidate() {
542 res
543 } else {
544 // We need to replace the adapter.
545
546 self.ndisplay = 0;
547 self.nadapter += 1;
548
549 self.adapter = unsafe {
550 let mut adapter = ptr::null_mut();
551 (*self.factory.0).EnumAdapters1(self.nadapter, &mut adapter);
552 ComPtr(adapter)
553 };
554
555 if let Some(res) = self.read_and_invalidate() {
556 res
557 } else {
558 // All subsequent adapters will also be empty.
559 None
560 }
561 }
562 }
563}
564
565pub struct Display {

Callers 2

testFunction · 0.45
streams_from_responseFunction · 0.45

Calls 2

ComPtrClass · 0.85
read_and_invalidateMethod · 0.80

Tested by 1

testFunction · 0.36