MCPcopy Create free account
hub / github.com/ermak-dev/cloudpub / credentials

Method credentials

common/src/protocol.rs:202–215  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

200
201impl Endpoint for ClientEndpoint {
202 fn credentials(&self) -> String {
203 let mut s = String::new();
204 if !self.username.is_empty() {
205 s.push_str(&encode(&self.username));
206 }
207 if !self.password.is_empty() {
208 s.push(':');
209 s.push_str(&encode(&self.password));
210 }
211 if !s.is_empty() {
212 s.push('@');
213 }
214 s
215 }
216
217 fn as_url(&self) -> String {
218 match self.local_proto.try_into().unwrap() {

Callers 1

as_urlMethod · 0.45

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected