MCPcopy Index your code
hub / github.com/endbasic/endbasic / do_login

Method do_login

client/src/cmds.rs:115–135  ·  view source on GitHub ↗

Performs the login workflow against the server.

(&self, username: &str, password: &str)

Source from the content-addressed store, hash-verified

113
114 /// Performs the login workflow against the server.
115 async fn do_login(&self, username: &str, password: &str) -> io::Result<()> {
116 let response = self.service.borrow_mut().login(username, password).await?;
117
118 {
119 let console = &mut *self.console.borrow_mut();
120 if !is_narrow(&*console) && !response.motd.is_empty() {
121 console.print("")?;
122 console.print("----- BEGIN SERVER MOTD -----")?;
123 for line in response.motd {
124 refill_and_print(console, [line], "")?;
125 }
126 console.print("----- END SERVER MOTD -----")?;
127 console.print("")?;
128 }
129 }
130
131 let mut storage = self.storage.borrow_mut();
132 storage.mount("CLOUD", &format!("cloud://{}", username))?;
133
134 Ok(())
135 }
136}
137
138#[async_trait(?Send)]

Callers 5

async_execMethod · 0.45
test_share_make_publicFunction · 0.45

Calls 6

is_narrowFunction · 0.85
refill_and_printFunction · 0.85
mountMethod · 0.80
loginMethod · 0.45
is_emptyMethod · 0.45
printMethod · 0.45