Debian Codegraph @

src/encoder/writer.rs

raw symbols SCIP
1 use craterust-analyzer cargo tiff 0.11.3 crate/::encoderrust-analyzer cargo tiff 0.11.3 encoder/::compressionrust-analyzer cargo tiff 0.11.3 encoder/compression/::*;
2 use craterust-analyzer cargo tiff 0.11.3 crate/::errorrust-analyzer cargo tiff 0.11.3 error/::TiffResultrust-analyzer cargo tiff 0.11.3 error/TiffResult#;
3 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/::{selfrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/, Seekrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Seek#, SeekFromrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/SeekFrom#, Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#};
4
5 pub fn write_tiff_headerrust-analyzer cargo tiff 0.11.3 encoder/writer/write_tiff_header().<W: Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#>(writer: &mut TiffWriterrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#<W>) -> TiffResultrust-analyzer cargo tiff 0.11.3 error/TiffResult#<()> {
6 #[cfg(target_endian = "little")]
7 let boi: u8 = 0x49;
8 #[cfg(not(target_endian = "little"))]
9 let boi: u8 = 0x4d;
10
11 writer.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer..write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&[boi, boi])?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
12 writer.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer..write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&42u16.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
13 writer.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().4;
14
15 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
16 }
17
18 /// Writes a BigTiff header, excluding the IFD offset field.
19 ///
20 /// Writes the byte order, version number, offset byte size, and zero constant fields. Does
21 // _not_ write the offset to the first IFD, this should be done by the caller.
22 pub fn write_bigtiff_headerrust-analyzer cargo tiff 0.11.3 encoder/writer/write_bigtiff_header().<W: Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#>(writer: &mut TiffWriterrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#<W>) -> TiffResultrust-analyzer cargo tiff 0.11.3 error/TiffResult#<()> {
23 #[cfg(target_endian = "little")]
24 let boi: u8 = 0x49;
25 #[cfg(not(target_endian = "little"))]
26 let boi: u8 = 0x4d;
27
28 // byte order indication
29 writer.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer..write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&[boi, boi])?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
30 // version number
31 writer.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer..write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&43u16.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
32 // bytesize of offsets (pointer size)
33 writer.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer..write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&8u16.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
34 // always 0
35 writer.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer..write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&0u16.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
36
37 // we wrote 8 bytes, so set the internal offset accordingly
38 writer.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().8;
39
40 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
41 }
42
43 pub struct TiffWriterrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#<W> {
44 writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer.: W,
45 offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset.: u64,
46 byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.: u64,
47 compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.: Compressorrust-analyzer cargo tiff 0.11.3 encoder/compression/Compressor#,
48 }
49
50 impl<W: Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#> TiffWriterrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#<W> {
51 pub fn newrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]new().(writer: W) -> Selfrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`] {
52 Selfrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`] {
53 writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer.,
54 offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset.: 0,
55 byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.: 0,
56 compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.: Compressorrust-analyzer cargo tiff 0.11.3 encoder/compression/Compressor#::defaultrust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][Default]default().(),
57 }
58 }
59
60 pub fn set_compressionrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]set_compression().(&mut self, compressor: Compressorrust-analyzer cargo tiff 0.11.3 encoder/compression/Compressor#) {
61 self.compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor. = compressor;
62 }
63
64 pub fn reset_compressionrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]reset_compression().(&mut self) {
65 self.compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor. = Compressorrust-analyzer cargo tiff 0.11.3 encoder/compression/Compressor#::defaultrust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][Default]default().();
66 }
67
68 pub fn offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]offset().(&self) -> u64 {
69 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset.
70 }
71
72 pub(craterust-analyzer cargo tiff 0.11.3 crate/) fn previous_ifd_pointerrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]previous_ifd_pointer().<K: superrust-analyzer cargo tiff 0.11.3 encoder/::TiffKindrust-analyzer cargo tiff 0.11.3 encoder/TiffKind#>(&self) -> u64 {
73 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]offset().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<K::OffsetTyperust-analyzer cargo tiff 0.11.3 encoder/TiffKind#OffsetType#>() as u64
74 }
75
76 pub fn last_writtenrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]last_written().(&self) -> u64 {
77 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.
78 }
79
80 pub fn write_bytesrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_bytes().(&mut self, bytes: &[u8]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
81 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self.compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor..write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., bytes)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
82 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
83 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
84 }
85
86 pub fn write_u8rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_u8().(&mut self, n: u8) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
87 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
88 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
89 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &n.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u8]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
90 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
91 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
92 }
93
94 pub fn write_i8rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_i8().(&mut self, n: i8) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
95 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
96 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
97 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &n.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i8]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
98 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
99 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
100 }
101
102 pub fn write_u16rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_u16().(&mut self, n: u16) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
103 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
104 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
105 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &n.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
106 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
107
108 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
109 }
110
111 pub fn write_i16rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_i16().(&mut self, n: i16) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
112 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
113 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
114 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &n.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i16]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
115 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
116
117 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
118 }
119
120 pub fn write_u32rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_u32().(&mut self, n: u32) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
121 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
122 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
123 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &n.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
124 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
125
126 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
127 }
128
129 pub fn write_i32rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_i32().(&mut self, n: i32) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
130 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
131 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
132 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &n.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
133 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
134
135 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
136 }
137
138 pub fn write_u64rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_u64().(&mut self, n: u64) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
139 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
140 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
141 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &n.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
142 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
143
144 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
145 }
146
147 pub fn write_i64rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_i64().(&mut self, n: i64) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
148 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
149 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
150 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &n.to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i64]to_ne_bytes().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
151 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
152
153 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
154 }
155
156 pub fn write_f32rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_f32().(&mut self, n: f32) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
157 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
158 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
159 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &u32::to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_ne_bytes().(n.to_bitsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]to_bits().()))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
160 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
161
162 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
163 }
164
165 pub fn write_f64rust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]write_f64().(&mut self, n: f64) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
166 self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count. = self
167 .compressorrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#compressor.
168 .write_torust-analyzer cargo tiff 0.11.3 encoder/compression/impl#[Compressor][CompressionAlgorithm]write_to().(&mut self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer., &u64::to_ne_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]to_ne_bytes().(n.to_bitsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]to_bits().()))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
169 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().self.byte_countrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#byte_count.;
170
171 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
172 }
173
174 pub fn pad_word_boundaryrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]pad_word_boundary().(&mut self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
175 if self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Rem<Self>`]rem().4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]ne().0 {
176 let padding = [0, 0, 0];
177 let padd_len = 4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().(self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Rem<Self>`]rem().4);
178 self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer..write_allrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write_all().(&padding[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#padd_len as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
179 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`AddAssign<Self>`]add_assign().padd_len;
180 }
181
182 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
183 }
184 }
185
186 impl<W: Seekrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Seek#> TiffWriterrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#<W> {
187 pub fn goto_offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`TiffWriter<W>`]goto_offset().(&mut self, offset: u64) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#> {
188 self.offsetrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#offset. = offset;
189 self.writerrust-analyzer cargo tiff 0.11.3 encoder/writer/TiffWriter#writer..seekrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Seek#seek().(SeekFromrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/SeekFrom#::Startrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/SeekFrom#Start#(offset))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
190 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
191 }
192 }
193
194 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
195 fn encoder_on_short_writesrust-analyzer cargo tiff 0.11.3 encoder/writer/encoder_on_short_writes().() {
196 struct ShortWriterrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#<T> {
197 innerrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#inner.: T,
198 }
199
200 impl<T: 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/::Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#> 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/::Writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write# for ShortWriterrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#<T> {
201 fn writerust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`ShortWriter<T>`][Write]write().(&mut self, buf: &[u8]) -> 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/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<usize> {
202 let lower_bound = buf.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().().minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#min().(1);
203 let lower = buf.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().().saturating_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[usize]saturating_sub().(1).maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#max().(lower_bound);
204
205 self.innerrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#inner..writerust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#write().(&buf[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#lower]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)
206 }
207
208 fn flushrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`ShortWriter<T>`][Write]flush().(&mut self) -> 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/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()> {
209 self.innerrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#inner..flushrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Write#flush().()
210 }
211 }
212
213 impl<T: 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/::Seekrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Seek#> 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/::Seekrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Seek# for ShortWriterrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#<T> {
214 fn seekrust-analyzer cargo tiff 0.11.3 encoder/writer/impl#[`ShortWriter<T>`][Seek]seek().(&mut self, pos: 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/::SeekFromrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/SeekFrom#) -> 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/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<u64> {
215 self.innerrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#inner..seekrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Seek#seek().(pos)
216 }
217 }
218
219 let mut write = ShortWriterrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter# {
220 innerrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#inner.: 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/::Cursorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/Cursor#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/impl#[`Cursor<T>`]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0u8; 0]),
221 };
222
223 let imgdata = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![42u8; 100 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). 100];
224 let mut data = craterust-analyzer cargo tiff 0.11.3 crate/::decoderrust-analyzer cargo tiff 0.11.3 decoder/::DecodingResultrust-analyzer cargo tiff 0.11.3 decoder/DecodingResult#::U8rust-analyzer cargo tiff 0.11.3 decoder/DecodingResult#U8#(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![]);
225
226 for comp in [
227 superrust-analyzer cargo tiff 0.11.3 encoder/::Compressionrust-analyzer cargo tiff 0.11.3 encoder/Compression#::Uncompressedrust-analyzer cargo tiff 0.11.3 encoder/Compression#Uncompressed#,
228 superrust-analyzer cargo tiff 0.11.3 encoder/::Compressionrust-analyzer cargo tiff 0.11.3 encoder/Compression#::Packbitsrust-analyzer cargo tiff 0.11.3 encoder/Compression#Packbits#,
229 ] {
230 write.innerrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#inner..set_positionrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/impl#[`Cursor<T>`]set_position().(0);
231 write.innerrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#inner..get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/impl#[`Cursor<T>`]get_mut().().clearrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]clear().();
232
233 {
234 let mut tiff_writer = superrust-analyzer cargo tiff 0.11.3 encoder/::TiffEncoderrust-analyzer cargo tiff 0.11.3 encoder/TiffEncoder#::newrust-analyzer cargo tiff 0.11.3 encoder/impl#[`TiffEncoder<W>`]new().(&mut write)
235 .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()
236 .with_compressionrust-analyzer cargo tiff 0.11.3 encoder/impl#[`TiffEncoder<W, K>`]with_compression().(comp);
237
238 tiff_writer
239 .write_imagerust-analyzer cargo tiff 0.11.3 encoder/impl#[`TiffEncoder<W, K>`]write_image().::<superrust-analyzer cargo tiff 0.11.3 encoder/::Gray8rust-analyzer cargo tiff 0.11.3 encoder/colortype/Gray8#>(100, 100, &imgdata)
240 .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
241 }
242
243 write.innerrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#inner..set_positionrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/impl#[`Cursor<T>`]set_position().(0);
244 let mut tiff_reader = craterust-analyzer cargo tiff 0.11.3 crate/::decoderrust-analyzer cargo tiff 0.11.3 decoder/::Decoderrust-analyzer cargo tiff 0.11.3 decoder/Decoder#::newrust-analyzer cargo tiff 0.11.3 decoder/impl#[`Decoder<R>`]new().(&mut write.innerrust-analyzer cargo tiff 0.11.3 encoder/writer/ShortWriter#inner.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
245 let _layout = tiff_reader.read_image_to_bufferrust-analyzer cargo tiff 0.11.3 decoder/impl#[`Decoder<R>`]read_image_to_buffer().(&mut data).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
246
247 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(
248 matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(&data, craterust-analyzer cargo tiff 0.11.3 crate/::decoderrust-analyzer cargo tiff 0.11.3 decoder/::DecodingResultrust-analyzer cargo tiff 0.11.3 decoder/DecodingResult#::U8rust-analyzer cargo tiff 0.11.3 decoder/DecodingResult#U8#(v) if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().v == imgdata),
249 "{data:?} @ {}",
250 data.as_bufferrust-analyzer cargo tiff 0.11.3 decoder/impl#[DecodingResult]as_buffer().(0).byte_lenrust-analyzer cargo tiff 0.11.3 decoder/impl#[`DecodingBuffer<'a>`]byte_len().()
251 );
252 }
253 }