MCPcopy Create free account
hub / github.com/Rustixir/darkbird / set

Method set

src/darkbird/database.rs:492–511  ·  view source on GitHub ↗
(&self, key: K, value: Doc, expire: Option<Duration>)

Source from the content-addressed store, hash-verified

490 /// Just for redisstore engine
491 #[inline]
492 pub fn set<K, Doc>(&self, key: K, value: Doc, expire: Option<Duration>) -> Result<(), SessionResult>
493 where
494 Doc: Clone + Send + Sync + 'static,
495 K: Clone
496 + PartialOrd
497 + Ord
498 + PartialEq
499 + Eq
500 + Hash
501 + Send
502 + 'static
503 {
504 match self.datastores.get::<RedisStorage<K, Doc>>() {
505 None => Err(SessionResult::DataStoreNotFound),
506 Some(datastore) => {
507 datastore.set(key, value, expire);
508 Ok(())
509 }
510 }
511 }
512
513
514 /// Just for redisstore engine

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected