+
+
diff --git a/input.rs b/input.rs
new file mode 100644
index 0000000..0e6c0e5
--- /dev/null
+++ b/input.rs
@@ -0,0 +1,52 @@
+/// std::io::Write
+pub trait Write {
+ /// Writes a formatted string into this writer, returning any error encountered.
+ ///
+ /// This method is primarily used to interface with the [`format_args!()`] macro, and it is rare that this should explicitly be called. The [`write!()`] macro should be favored to invoke this method instead.
+ ///
+ /// This function internally uses the [`write_all`] method on this trait and hence will continuously write data so long as no errors are received. This also means that partial writes are not indicated in this signature.
+ ///
+ /// [`write_all`]: Write::write_all
+ ///
+ /// # Errors
+ ///
+ /// This function will return any I/O error reported while formatting.
+ ///
+ /// ...
+ #[stable(feature = "rust1", since = "1.0.0")]
+ fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {
+ // Create a shim which translates a Write to a fmt::Write and saves off I/O errors. instead of discarding them
+ struct Adapter<'a, T: ?Sized + 'a> {
+ inner: &'a mut T,
+ error: Result<()>,
+ }
+
+ impl fmt::Write for Adapter<'_, T> {
+ fn write_str(&mut self, s: &str) -> fmt::Result {
+ match self.inner.write_all(s.as_bytes()) {
+ Ok(()) => Ok(()),
+ Err(e) => {
+ self.error = Err(e);
+ Err(fmt::Error)
+ }
+ }
+ }
+ }
+
+ let mut output = Adapter { inner: self, error: Ok(()) };
+ match fmt::write(&mut output, fmt) {
+ Ok(()) => Ok(()),
+ Err(..) => {
+ // check if the error came from the underlying `Write` or not
+ if output.error.is_err() {
+ output.error
+ } else {
+ // This shouldn't happen: the underlying stream did not error, but somehow the formatter still errored?
+ panic!(
+ "a formatting trait implementation returned an error when the underlying stream did not"
+ );
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/static/code-sample.json b/static/code-sample.json
new file mode 100644
index 0000000..04f312b
--- /dev/null
+++ b/static/code-sample.json
@@ -0,0 +1 @@
+[[40, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into\n /// this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to\n /// interface with the\n /// [`format_args!()`] macro, and it\n /// is rare that this should\n /// explicitly be called. The\n /// [`write!()`] macro should be\n /// favored to invoke this method\n /// instead.\n ///\n /// This function internally uses\n /// the [`write_all`] method on this\n /// trait and hence will\n /// continuously write data so long\n /// as no errors are received. This\n /// also means that partial writes\n /// are not indicated in this\n /// signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any\n /// I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(\n feature = \"rust1\",\n since = \"1.0.0\"\n )]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which\n // translates a Write to a\n // fmt::Write and saves off I/O\n // errors. instead of discarding\n // them\n struct Adapter<\n 'a,\n T: ?Sized + 'a,\n > {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl\n fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result\n {\n match self\n .inner\n .write_all(\n s.as_bytes(),\n ) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error =\n Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(\n &mut output,\n fmt,\n ) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error\n // came from the\n // underlying `Write` or\n // not\n if output.error.is_err()\n {\n output.error\n } else {\n // This shouldn't\n // happen: the\n // underlying stream\n // did not error,\n // but somehow the\n // formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [41, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into\n /// this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to\n /// interface with the\n /// [`format_args!()`] macro, and it\n /// is rare that this should\n /// explicitly be called. The\n /// [`write!()`] macro should be\n /// favored to invoke this method\n /// instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this\n /// trait and hence will continuously\n /// write data so long as no errors\n /// are received. This also means\n /// that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O\n /// error reported while formatting.\n ///\n /// ...\n #[stable(\n feature = \"rust1\",\n since = \"1.0.0\"\n )]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates\n // a Write to a fmt::Write and\n // saves off I/O errors. instead\n // of discarding them\n struct Adapter<\n 'a,\n T: ?Sized + 'a,\n > {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl\n fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result\n {\n match self\n .inner\n .write_all(\n s.as_bytes(),\n ) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error =\n Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(\n &mut output,\n fmt,\n ) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error\n // came from the\n // underlying `Write` or\n // not\n if output.error.is_err()\n {\n output.error\n } else {\n // This shouldn't\n // happen: the\n // underlying stream\n // did not error, but\n // somehow the\n // formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [42, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into\n /// this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to\n /// interface with the\n /// [`format_args!()`] macro, and it\n /// is rare that this should\n /// explicitly be called. The\n /// [`write!()`] macro should be\n /// favored to invoke this method\n /// instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait\n /// and hence will continuously write\n /// data so long as no errors are\n /// received. This also means that\n /// partial writes are not indicated\n /// in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O\n /// error reported while formatting.\n ///\n /// ...\n #[stable(\n feature = \"rust1\",\n since = \"1.0.0\"\n )]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates\n // a Write to a fmt::Write and\n // saves off I/O errors. instead\n // of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(\n s.as_bytes(),\n ) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error =\n Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt)\n {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came\n // from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't\n // happen: the\n // underlying stream\n // did not error, but\n // somehow the\n // formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [43, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this\n /// writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to\n /// interface with the\n /// [`format_args!()`] macro, and it is\n /// rare that this should explicitly be\n /// called. The [`write!()`] macro\n /// should be favored to invoke this\n /// method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait\n /// and hence will continuously write\n /// data so long as no errors are\n /// received. This also means that\n /// partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O\n /// error reported while formatting.\n ///\n /// ...\n #[stable(\n feature = \"rust1\",\n since = \"1.0.0\"\n )]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a\n // Write to a fmt::Write and saves\n // off I/O errors. instead of\n // discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self.inner.write_all(\n s.as_bytes(),\n ) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error =\n Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt)\n {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came\n // from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't\n // happen: the\n // underlying stream\n // did not error, but\n // somehow the\n // formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [44, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this\n /// writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to\n /// interface with the\n /// [`format_args!()`] macro, and it is\n /// rare that this should explicitly be\n /// called. The [`write!()`] macro\n /// should be favored to invoke this\n /// method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait\n /// and hence will continuously write\n /// data so long as no errors are\n /// received. This also means that\n /// partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O\n /// error reported while formatting.\n ///\n /// ...\n #[stable(\n feature = \"rust1\",\n since = \"1.0.0\"\n )]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a\n // Write to a fmt::Write and saves\n // off I/O errors. instead of\n // discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came\n // from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't\n // happen: the\n // underlying stream did\n // not error, but\n // somehow the formatter\n // still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [45, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this\n /// writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to\n /// interface with the [`format_args!()`]\n /// macro, and it is rare that this\n /// should explicitly be called. The\n /// [`write!()`] macro should be favored\n /// to invoke this method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait\n /// and hence will continuously write\n /// data so long as no errors are\n /// received. This also means that\n /// partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O\n /// error reported while formatting.\n ///\n /// ...\n #[stable(\n feature = \"rust1\",\n since = \"1.0.0\"\n )]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a\n // Write to a fmt::Write and saves\n // off I/O errors. instead of\n // discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came\n // from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen:\n // the underlying stream\n // did not error, but\n // somehow the formatter\n // still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [46, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this\n /// writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to\n /// interface with the [`format_args!()`]\n /// macro, and it is rare that this should\n /// explicitly be called. The [`write!()`]\n /// macro should be favored to invoke this\n /// method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait and\n /// hence will continuously write data so\n /// long as no errors are received. This\n /// also means that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O\n /// error reported while formatting.\n ///\n /// ...\n #[stable(\n feature = \"rust1\",\n since = \"1.0.0\"\n )]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a\n // Write to a fmt::Write and saves off\n // I/O errors. instead of discarding\n // them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came\n // from the underlying `Write`\n // or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen:\n // the underlying stream\n // did not error, but\n // somehow the formatter\n // still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [47, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this\n /// writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to\n /// interface with the [`format_args!()`]\n /// macro, and it is rare that this should\n /// explicitly be called. The [`write!()`]\n /// macro should be favored to invoke this\n /// method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait and\n /// hence will continuously write data so\n /// long as no errors are received. This\n /// also means that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error\n /// reported while formatting.\n ///\n /// ...\n #[stable(\n feature = \"rust1\",\n since = \"1.0.0\"\n )]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a\n // Write to a fmt::Write and saves off\n // I/O errors. instead of discarding\n // them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from\n // the underlying `Write` or\n // not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen:\n // the underlying stream\n // did not error, but\n // somehow the formatter\n // still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [48, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this\n /// writer, returning any error encountered.\n ///\n /// This method is primarily used to\n /// interface with the [`format_args!()`]\n /// macro, and it is rare that this should\n /// explicitly be called. The [`write!()`]\n /// macro should be favored to invoke this\n /// method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait and\n /// hence will continuously write data so\n /// long as no errors are received. This\n /// also means that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error\n /// reported while formatting.\n ///\n /// ...\n #[stable(\n feature = \"rust1\",\n since = \"1.0.0\"\n )]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a\n // Write to a fmt::Write and saves off\n // I/O errors. instead of discarding\n // them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from\n // the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen:\n // the underlying stream did\n // not error, but somehow\n // the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [49, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this\n /// writer, returning any error encountered.\n ///\n /// This method is primarily used to\n /// interface with the [`format_args!()`]\n /// macro, and it is rare that this should\n /// explicitly be called. The [`write!()`]\n /// macro should be favored to invoke this\n /// method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait and\n /// hence will continuously write data so\n /// long as no errors are received. This also\n /// means that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error\n /// reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write\n // to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from\n // the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not\n // error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [50, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this\n /// writer, returning any error encountered.\n ///\n /// This method is primarily used to interface\n /// with the [`format_args!()`] macro, and it\n /// is rare that this should explicitly be\n /// called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait and\n /// hence will continuously write data so long\n /// as no errors are received. This also means\n /// that partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error\n /// reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write\n // to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from\n // the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not\n // error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [51, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer,\n /// returning any error encountered.\n ///\n /// This method is primarily used to interface\n /// with the [`format_args!()`] macro, and it\n /// is rare that this should explicitly be\n /// called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait and\n /// hence will continuously write data so long\n /// as no errors are received. This also means\n /// that partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error\n /// reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write\n // to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not\n // error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [52, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer,\n /// returning any error encountered.\n ///\n /// This method is primarily used to interface\n /// with the [`format_args!()`] macro, and it is\n /// rare that this should explicitly be called.\n /// The [`write!()`] macro should be favored to\n /// invoke this method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait and hence\n /// will continuously write data so long as no\n /// errors are received. This also means that\n /// partial writes are not indicated in this\n /// signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error\n /// reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to\n // a fmt::Write and saves off I/O errors.\n // instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not\n // error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [54, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer,\n /// returning any error encountered.\n ///\n /// This method is primarily used to interface\n /// with the [`format_args!()`] macro, and it is\n /// rare that this should explicitly be called.\n /// The [`write!()`] macro should be favored to\n /// invoke this method instead.\n ///\n /// This function internally uses the\n /// [`write_all`] method on this trait and hence\n /// will continuously write data so long as no\n /// errors are received. This also means that\n /// partial writes are not indicated in this\n /// signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error\n /// reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors.\n // instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write\n for Adapter<'_, T>\n {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not\n // error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [55, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer,\n /// returning any error encountered.\n ///\n /// This method is primarily used to interface with\n /// the [`format_args!()`] macro, and it is rare\n /// that this should explicitly be called. The\n /// [`write!()`] macro should be favored to invoke\n /// this method instead.\n ///\n /// This function internally uses the [`write_all`]\n /// method on this trait and hence will\n /// continuously write data so long as no errors\n /// are received. This also means that partial\n /// writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error\n /// reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors. instead\n // of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self\n .inner\n .write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not error,\n // but somehow the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [56, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer,\n /// returning any error encountered.\n ///\n /// This method is primarily used to interface with\n /// the [`format_args!()`] macro, and it is rare\n /// that this should explicitly be called. The\n /// [`write!()`] macro should be favored to invoke\n /// this method instead.\n ///\n /// This function internally uses the [`write_all`]\n /// method on this trait and hence will continuously\n /// write data so long as no errors are received.\n /// This also means that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported\n /// while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors. instead\n // of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self.inner.write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not error,\n // but somehow the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [57, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer,\n /// returning any error encountered.\n ///\n /// This method is primarily used to interface with\n /// the [`format_args!()`] macro, and it is rare that\n /// this should explicitly be called. The\n /// [`write!()`] macro should be favored to invoke\n /// this method instead.\n ///\n /// This function internally uses the [`write_all`]\n /// method on this trait and hence will continuously\n /// write data so long as no errors are received.\n /// This also means that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported\n /// while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors. instead\n // of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self.inner.write_all(s.as_bytes())\n {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not error,\n // but somehow the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [58, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer,\n /// returning any error encountered.\n ///\n /// This method is primarily used to interface with\n /// the [`format_args!()`] macro, and it is rare that\n /// this should explicitly be called. The [`write!()`]\n /// macro should be favored to invoke this method\n /// instead.\n ///\n /// This function internally uses the [`write_all`]\n /// method on this trait and hence will continuously\n /// write data so long as no errors are received. This\n /// also means that partial writes are not indicated\n /// in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported\n /// while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors. instead of\n // discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not error,\n // but somehow the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [59, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer,\n /// returning any error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this\n /// should explicitly be called. The [`write!()`] macro\n /// should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`]\n /// method on this trait and hence will continuously\n /// write data so long as no errors are received. This\n /// also means that partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported\n /// while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors. instead of\n // discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the\n // underlying stream did not error, but\n // somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [60, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer,\n /// returning any error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this\n /// should explicitly be called. The [`write!()`] macro\n /// should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`]\n /// method on this trait and hence will continuously\n /// write data so long as no errors are received. This\n /// also means that partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported\n /// while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors. instead of\n // discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(\n &mut self,\n s: &str,\n ) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying\n // stream did not error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [61, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning\n /// any error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this\n /// should explicitly be called. The [`write!()`] macro\n /// should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`]\n /// method on this trait and hence will continuously\n /// write data so long as no errors are received. This\n /// also means that partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported\n /// while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors. instead of\n // discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the\n // underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying\n // stream did not error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [62, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning\n /// any error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this\n /// should explicitly be called. The [`write!()`] macro\n /// should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method\n /// on this trait and hence will continuously write data\n /// so long as no errors are received. This also means\n /// that partial writes are not indicated in this\n /// signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors. instead of\n // discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying\n // stream did not error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [63, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning\n /// any error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this\n /// should explicitly be called. The [`write!()`] macro\n /// should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method\n /// on this trait and hence will continuously write data so\n /// long as no errors are received. This also means that\n /// partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a\n // fmt::Write and saves off I/O errors. instead of\n // discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying\n // stream did not error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [65, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any\n /// error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on\n /// this trait and hence will continuously write data so long\n /// as no errors are received. This also means that partial\n /// writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write\n // and saves off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying\n // stream did not error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [67, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any\n /// error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on\n /// this trait and hence will continuously write data so long\n /// as no errors are received. This also means that partial\n /// writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(\n &mut self,\n fmt: fmt::Arguments<'_>,\n ) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write\n // and saves off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream\n // did not error, but somehow the formatter\n // still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [68, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any\n /// error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on\n /// this trait and hence will continuously write data so long as\n /// no errors are received. This also means that partial writes\n /// are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write\n // and saves off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream\n // did not error, but somehow the formatter\n // still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [69, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any\n /// error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on\n /// this trait and hence will continuously write data so long as\n /// no errors are received. This also means that partial writes\n /// are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and\n // saves off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying\n // `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream\n // did not error, but somehow the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [70, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any\n /// error encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be favored\n /// to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this\n /// trait and hence will continuously write data so long as no\n /// errors are received. This also means that partial writes are\n /// not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and\n // saves off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write`\n // or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream\n // did not error, but somehow the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [71, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be favored\n /// to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this\n /// trait and hence will continuously write data so long as no\n /// errors are received. This also means that partial writes are\n /// not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and\n // saves off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write`\n // or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did\n // not error, but somehow the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [72, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be favored\n /// to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this\n /// trait and hence will continuously write data so long as no\n /// errors are received. This also means that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and\n // saves off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write`\n // or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did\n // not error, but somehow the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [73, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be favored to\n /// invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this\n /// trait and hence will continuously write data so long as no errors\n /// are received. This also means that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while\n /// formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and\n // saves off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or\n // not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did\n // not error, but somehow the formatter still\n // errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [74, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be favored to\n /// invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this\n /// trait and hence will continuously write data so long as no errors\n /// are received. This also means that partial writes are not\n /// indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and\n // saves off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or\n // not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did\n // not error, but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [75, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should\n /// explicitly be called. The [`write!()`] macro should be favored to\n /// invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this\n /// trait and hence will continuously write data so long as no errors\n /// are received. This also means that partial writes are not indicated\n /// in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves\n // off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or\n // not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not\n // error, but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [76, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should explicitly\n /// be called. The [`write!()`] macro should be favored to invoke this\n /// method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait\n /// and hence will continuously write data so long as no errors are\n /// received. This also means that partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves\n // off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or\n // not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not\n // error, but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [77, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the\n /// [`format_args!()`] macro, and it is rare that this should explicitly\n /// be called. The [`write!()`] macro should be favored to invoke this\n /// method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait\n /// and hence will continuously write data so long as no errors are\n /// received. This also means that partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves\n // off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not\n // error, but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [78, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`]\n /// macro, and it is rare that this should explicitly be called. The\n /// [`write!()`] macro should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait\n /// and hence will continuously write data so long as no errors are\n /// received. This also means that partial writes are not indicated in\n /// this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves\n // off I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not\n // error, but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [79, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`]\n /// macro, and it is rare that this should explicitly be called. The\n /// [`write!()`] macro should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait\n /// and hence will continuously write data so long as no errors are\n /// received. This also means that partial writes are not indicated in this\n /// signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off\n // I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not\n // error, but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [80, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`]\n /// macro, and it is rare that this should explicitly be called. The\n /// [`write!()`] macro should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and\n /// hence will continuously write data so long as no errors are received.\n /// This also means that partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off\n // I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not\n // error, but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [82, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`]\n /// macro, and it is rare that this should explicitly be called. The\n /// [`write!()`] macro should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and\n /// hence will continuously write data so long as no errors are received. This\n /// also means that partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off\n // I/O errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error,\n // but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [83, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error\n /// encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`]\n /// macro, and it is rare that this should explicitly be called. The\n /// [`write!()`] macro should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and\n /// hence will continuously write data so long as no errors are received. This\n /// also means that partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error,\n // but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [84, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`]\n /// macro, and it is rare that this should explicitly be called. The\n /// [`write!()`] macro should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and\n /// hence will continuously write data so long as no errors are received. This\n /// also means that partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error,\n // but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [85, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro,\n /// and it is rare that this should explicitly be called. The [`write!()`] macro\n /// should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and\n /// hence will continuously write data so long as no errors are received. This\n /// also means that partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error,\n // but somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [86, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro,\n /// and it is rare that this should explicitly be called. The [`write!()`] macro\n /// should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence\n /// will continuously write data so long as no errors are received. This also\n /// means that partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but\n // somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [87, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro,\n /// and it is rare that this should explicitly be called. The [`write!()`] macro\n /// should be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence\n /// will continuously write data so long as no errors are received. This also means\n /// that partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but\n // somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [89, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro, and\n /// it is rare that this should explicitly be called. The [`write!()`] macro should\n /// be favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence\n /// will continuously write data so long as no errors are received. This also means\n /// that partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but\n // somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [90, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro, and\n /// it is rare that this should explicitly be called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence\n /// will continuously write data so long as no errors are received. This also means\n /// that partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O\n // errors. instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but\n // somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [91, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro, and\n /// it is rare that this should explicitly be called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence will\n /// continuously write data so long as no errors are received. This also means that\n /// partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O errors.\n // instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but\n // somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [92, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro, and it\n /// is rare that this should explicitly be called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence will\n /// continuously write data so long as no errors are received. This also means that\n /// partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O errors.\n // instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but\n // somehow the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [94, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro, and it\n /// is rare that this should explicitly be called. The [`write!()`] macro should be\n /// favored to invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence will\n /// continuously write data so long as no errors are received. This also means that\n /// partial writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O errors.\n // instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but somehow\n // the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [95, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro, and it is\n /// rare that this should explicitly be called. The [`write!()`] macro should be favored to\n /// invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence will\n /// continuously write data so long as no errors are received. This also means that partial\n /// writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O errors.\n // instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but somehow\n // the formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [98, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro, and it is\n /// rare that this should explicitly be called. The [`write!()`] macro should be favored to\n /// invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence will\n /// continuously write data so long as no errors are received. This also means that partial\n /// writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O errors.\n // instead of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"], [99, "/// std::io::Write\npub trait Write {\n /// Writes a formatted string into this writer, returning any error encountered.\n ///\n /// This method is primarily used to interface with the [`format_args!()`] macro, and it is\n /// rare that this should explicitly be called. The [`write!()`] macro should be favored to\n /// invoke this method instead.\n ///\n /// This function internally uses the [`write_all`] method on this trait and hence will\n /// continuously write data so long as no errors are received. This also means that partial\n /// writes are not indicated in this signature.\n ///\n /// [`write_all`]: Write::write_all\n ///\n /// # Errors\n ///\n /// This function will return any I/O error reported while formatting.\n ///\n /// ...\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> Result<()> {\n // Create a shim which translates a Write to a fmt::Write and saves off I/O errors. instead\n // of discarding them\n struct Adapter<'a, T: ?Sized + 'a> {\n inner: &'a mut T,\n error: Result<()>,\n }\n\n impl fmt::Write for Adapter<'_, T> {\n fn write_str(&mut self, s: &str) -> fmt::Result {\n match self.inner.write_all(s.as_bytes()) {\n Ok(()) => Ok(()),\n Err(e) => {\n self.error = Err(e);\n Err(fmt::Error)\n }\n }\n }\n }\n\n let mut output = Adapter {\n inner: self,\n error: Ok(()),\n };\n match fmt::write(&mut output, fmt) {\n Ok(()) => Ok(()),\n Err(..) => {\n // check if the error came from the underlying `Write` or not\n if output.error.is_err() {\n output.error\n } else {\n // This shouldn't happen: the underlying stream did not error, but somehow the\n // formatter still errored?\n panic!(\n \"a formatting trait implementation returned an error when the underlying stream did not\"\n );\n }\n }\n }\n }\n}\n"]]
\ No newline at end of file