fn write_str(&mut self, s: &str) -> fmt::Result {
	match self.0.write(s.as_bytes()) {
	    Ok(len) => { if len == s.len() { Ok(()) } else {Err(fmt::Error) } },
	    _ => Err(fmt::Error)
	}
    }
// technically, we are supposed to block until the ENTIRE string
// has been written. But that doesnt make sense in this
// application, so instead we are going to _try_ to write the
// string, and if we cannot write the whole thing, we return an
// error. The result type allowed in the fmt::Write doesnt return
// number of bytes written, but that is OK for now, since we only
// intend this write interface to be used for debugging stuff.
technically, we are supposed to block until the ENTIRE string
has been written. But that doesnt make sense in this
application, so instead we are going to _try_ to write the
string, and if we cannot write the whole thing, we return an
error. The result type allowed in the fmt::Write doesnt return
number of bytes written, but that is OK for now, since we only
intend this write interface to be used for debugging stuff.
technically we are supposed to block until the ENTIRE string has been written . But that doesnt make sense in this application so instead we are going to _try_ to write the string and if we cannot write the whole thing we return an error . The result type allowed in the fmt :: Write doesnt return number of bytes written but that is OK for now since we only intend this write interface to be used for debugging stuff .
fn write_str(&mut self, s: &str) -> fmt::Result {
	match self.0.write(s.as_bytes()) {
	    Ok(len) => { if len == s.len() { Ok(()) } else {Err(fmt::Error) } },
	    _ => Err(fmt::Error)
	}
    }
fn write_str ( & mut self , s : & str ) -> fmt :: Result { match self . 0 . write ( s . as_bytes ( ) ) { Ok ( len ) => { if len == s . len ( ) { Ok ( ( ) ) } else { Err ( fmt :: Error ) } } , _ => Err ( fmt :: Error ) } }
technically, we are supposed to block until the ENTIRE string
has been written.
technically we are supposed to block until the ENTIRE string has been written .
&mut self
s
&str
&mut self
s
&str