We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68b198a commit f674d8aCopy full SHA for f674d8a
src/pixmap.rs
@@ -316,6 +316,11 @@ impl<'a> PixmapRef<'a> {
316
}
317
318
319
+ /// Reborrows the current container
320
+ pub fn as_ref(&self) -> Self {
321
+ *self
322
+ }
323
+
324
/// Returns pixmap's width.
325
#[inline]
326
pub fn width(&self) -> u32 {
@@ -483,6 +488,14 @@ impl<'a> PixmapMut<'a> {
483
488
484
489
485
490
491
492
+ pub fn as_mut<'b: 'a>(&'b mut self) -> PixmapMut<'b> {
493
+ Self {
494
+ data: self.data,
495
+ size: self.size,
496
497
498
486
499
487
500
501
0 commit comments