@@ -32,22 +32,22 @@ pub const SIZE_HEADER: usize = 32;
3232pub const RESERVED : [ u8 ; 17 ] = [ 42 ; 17 ] ;
3333
3434#[ derive( Debug , Clone , Copy ) ]
35- pub struct BinseqHeaderBuilder {
35+ pub struct FileHeaderBuilder {
3636 slen : Option < u32 > ,
3737 xlen : Option < u32 > ,
3838 bitsize : Option < BitSize > ,
3939 flags : Option < bool > ,
4040}
41- impl Default for BinseqHeaderBuilder {
41+ impl Default for FileHeaderBuilder {
4242 fn default ( ) -> Self {
4343 Self :: new ( )
4444 }
4545}
4646
47- impl BinseqHeaderBuilder {
47+ impl FileHeaderBuilder {
4848 #[ must_use]
4949 pub fn new ( ) -> Self {
50- BinseqHeaderBuilder {
50+ FileHeaderBuilder {
5151 slen : None ,
5252 xlen : None ,
5353 bitsize : None ,
@@ -74,8 +74,8 @@ impl BinseqHeaderBuilder {
7474 self . flags = Some ( flags) ;
7575 self
7676 }
77- pub fn build ( self ) -> Result < BinseqHeader > {
78- Ok ( BinseqHeader {
77+ pub fn build ( self ) -> Result < FileHeader > {
78+ Ok ( FileHeader {
7979 magic : MAGIC ,
8080 format : FORMAT ,
8181 slen : if let Some ( slen) = self . slen {
@@ -93,13 +93,13 @@ impl BinseqHeaderBuilder {
9393
9494/// Header structure for binary sequence files
9595///
96- /// The `BinseqHeader ` contains metadata about the binary sequence data stored in a file,
96+ /// The `FileHeader ` contains metadata about the binary sequence data stored in a file,
9797/// including format information, sequence lengths, and space for future extensions.
9898///
9999/// The total size of this structure is 32 bytes, with a fixed layout to ensure
100100/// consistent reading and writing across different platforms.
101101#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
102- pub struct BinseqHeader {
102+ pub struct FileHeader {
103103 /// Magic number to identify the file format
104104 ///
105105 /// 4 bytes
@@ -135,7 +135,7 @@ pub struct BinseqHeader {
135135 /// 17 bytes
136136 pub reserved : [ u8 ; 17 ] ,
137137}
138- impl BinseqHeader {
138+ impl FileHeader {
139139 /// Creates a new header with the specified sequence length
140140 ///
141141 /// This constructor initializes a standard header with the given sequence length,
@@ -150,7 +150,7 @@ impl BinseqHeader {
150150 ///
151151 /// # Returns
152152 ///
153- /// A new `BinseqHeader ` instance
153+ /// A new `FileHeader ` instance
154154 #[ must_use]
155155 pub fn new ( bits : BitSize , slen : u32 , flags : bool ) -> Self {
156156 Self {
@@ -178,7 +178,7 @@ impl BinseqHeader {
178178 ///
179179 /// # Returns
180180 ///
181- /// A new `BinseqHeader ` instance with extended sequence information
181+ /// A new `FileHeader ` instance with extended sequence information
182182 #[ must_use]
183183 pub fn new_extended ( bits : BitSize , slen : u32 , xlen : u32 , flags : bool ) -> Self {
184184 Self {
@@ -214,7 +214,7 @@ impl BinseqHeader {
214214 ///
215215 /// # Returns
216216 ///
217- /// * `Ok(BinseqHeader )` - A valid header parsed from the buffer
217+ /// * `Ok(FileHeader )` - A valid header parsed from the buffer
218218 /// * `Err(Error)` - If the buffer contains invalid header data
219219 ///
220220 /// # Errors
@@ -266,7 +266,7 @@ impl BinseqHeader {
266266 ///
267267 /// # Returns
268268 ///
269- /// * `Ok(BinseqHeader )` - A valid header parsed from the buffer
269+ /// * `Ok(FileHeader )` - A valid header parsed from the buffer
270270 /// * `Err(Error)` - If the buffer is too small or contains invalid header data
271271 ///
272272 /// # Errors
@@ -324,7 +324,7 @@ impl BinseqHeader {
324324 ///
325325 /// # Returns
326326 ///
327- /// * `Ok(BinseqHeader )` - A valid header read from the reader
327+ /// * `Ok(FileHeader )` - A valid header read from the reader
328328 /// * `Err(Error)` - If reading from the reader failed or the header data is invalid
329329 ///
330330 /// # Errors
0 commit comments