MCPcopy Create free account
hub / github.com/clawshell/clawshell / read_line

Method read_line

src/email.rs:549–565  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

547 }
548
549 fn read_line(&mut self) -> Result<String, EmailServiceError> {
550 let mut line = String::new();
551 let read = self.stream.read_line(&mut line).map_err(|e| {
552 EmailServiceError::Api(format!("failed to read IMAP response line: {e}"))
553 })?;
554
555 if read == 0 {
556 return Err(EmailServiceError::Api(
557 "unexpected EOF while reading IMAP response".to_string(),
558 ));
559 }
560
561 while matches!(line.chars().last(), Some('\n' | '\r')) {
562 line.pop();
563 }
564 Ok(line)
565 }
566}
567
568fn connect_and_login(

Callers 3

expect_greetingMethod · 0.80
run_commandMethod · 0.80
prompt_confirm_compactFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected