Debian Codegraph @

src/traits.rs

raw symbols SCIP
1 //! Traits used in this library
2 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/;
3
4 /// Writer extension to write little endian data
5 pub trait WriteBytesExtrust-analyzer cargo gif 0.14.2 traits/WriteBytesExt#<T> {
6 /// Writes `T` to a bytes stream. Least significant byte first.
7 fn write_lerust-analyzer cargo gif 0.14.2 traits/WriteBytesExt#write_le().(&mut self, n: T) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()>;
8
9 /*
10 #[inline]
11 fn write_byte(&mut self, n: u8) -> io::Result<()> where Self: Write {
12 self.write_all(&[n])
13 }
14 */
15 }
16
17 impl<W: iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#> WriteBytesExtrust-analyzer cargo gif 0.14.2 traits/WriteBytesExt#<u8> for W {
18 #[inline(always)]
19 fn write_lerust-analyzer cargo gif 0.14.2 traits/impl#[W][`WriteBytesExt<u8>`]write_le().(&mut self, n: u8) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()> {
20 self.write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&[n])
21 }
22 }
23
24 impl<W: iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#> WriteBytesExtrust-analyzer cargo gif 0.14.2 traits/WriteBytesExt#<u16> for W {
25 #[inline]
26 fn write_lerust-analyzer cargo gif 0.14.2 traits/impl#[W][`WriteBytesExt<u16>`]write_le().(&mut self, n: u16) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()> {
27 self.write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&n.to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().())
28 }
29 }
30
31 impl<W: iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#> WriteBytesExtrust-analyzer cargo gif 0.14.2 traits/WriteBytesExt#<u32> for W {
32 #[inline]
33 fn write_lerust-analyzer cargo gif 0.14.2 traits/impl#[W][`WriteBytesExt<u32>`]write_le().(&mut self, n: u32) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()> {
34 self.write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&n.to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().())
35 }
36 }
37
38 impl<W: iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#> WriteBytesExtrust-analyzer cargo gif 0.14.2 traits/WriteBytesExt#<u64> for W {
39 #[inline]
40 fn write_lerust-analyzer cargo gif 0.14.2 traits/impl#[W][`WriteBytesExt<u64>`]write_le().(&mut self, n: u64) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()> {
41 self.write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&n.to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]to_le_bytes().())
42 }
43 }