MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / get_redis_url

Method get_redis_url

aiscript-runtime/src/config/db.rs:89–101  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

87 }
88
89 pub fn get_redis_url(&self) -> Option<String> {
90 self.redis.as_ref().and_then(|c| {
91 c.url
92 .clone()
93 .map(Into::into)
94 .or_else(|| match (&c.host, &c.port, &c.password) {
95 (Some(host), Some(port), Some(password)) => {
96 Some(format!("redis://:{}@{}:{}", password, host, port))
97 }
98 _ => None,
99 })
100 })
101 }
102}

Callers 1

get_redis_connectionFunction · 0.80

Calls 2

as_refMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected