We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df6eadc commit 78cfeaeCopy full SHA for 78cfeae
src/kv/source.rs
@@ -225,6 +225,7 @@ mod std_support {
225
use std::borrow::Borrow;
226
use std::collections::{BTreeMap, HashMap};
227
use std::hash::{BuildHasher, Hash};
228
+ use std::rc::Rc;
229
use std::sync::Arc;
230
231
impl<S> Source for Box<S>
@@ -261,6 +262,23 @@ mod std_support {
261
262
}
263
264
265
+ impl<S> Source for Rc<S>
266
+ where
267
+ S: Source + ?Sized,
268
+ {
269
+ fn visit<'kvs>(&'kvs self, visitor: &mut dyn Visitor<'kvs>) -> Result<(), Error> {
270
+ Source::visit(&**self, visitor)
271
+ }
272
+
273
+ fn get(&self, key: Key) -> Option<Value<'_>> {
274
+ Source::get(&**self, key)
275
276
277
+ fn count(&self) -> usize {
278
+ Source::count(&**self)
279
280
281
282
impl<S> Source for Vec<S>
283
where
284
S: Source,
0 commit comments