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 37ca9db commit 0928caaCopy full SHA for 0928caa
pdf/src/object/mod.rs
@@ -430,11 +430,19 @@ impl<T> PartialEq for MaybeRef<T> {
430
}
431
impl<T> Eq for MaybeRef<T> {}
432
433
-#[derive(Debug, Clone, DataSize)]
+#[derive(Debug, DataSize)]
434
pub struct Lazy<T> {
435
primitive: Primitive,
436
_marker: PhantomData<T>
437
438
+impl<T> Clone for Lazy<T> {
439
+ fn clone(&self) -> Self {
440
+ Lazy {
441
+ primitive: self.primitive.clone(),
442
+ _marker: PhantomData
443
+ }
444
445
+}
446
impl<T: Object> Lazy<T> {
447
pub fn load(&self, resolve: &impl Resolve) -> Result<T> {
448
T::from_primitive(self.primitive.clone(), resolve)
0 commit comments