pub fn bit_length_of_field(&self, field_index: isize) -> usize {
        /* Check provided index */
        let last_field_index = self.get_absolute_index(field_index);
        if last_field_index < 0 {
            return 0;
        }

        /* Calculate segment bit length */
        let mut bit_length = 0;
        for index in 0..last_field_index as usize {
            bit_length += self.fields[index].bit_length();
        }

        bit_length
    }
/**
     * Returns the bit length up to and including the specified field, excluding the last variable length field if not set
     * @param fieldIndex the index of the field up to which the segment length is calculated; negative index counts back from last field
     * @return the bit length of this segment up to and including the specified field, or 0 if the field does not exist
     */
Returns the bit length up to and including the specified field, excluding the last variable length field if not set
@param fieldIndex the index of the field up to which the segment length is calculated; negative index counts back from last field
@return the bit length of this segment up to and including the specified field, or 0 if the field does not exist
Returns the bit length up to and including the specified field excluding the last variable length field if not set @param fieldIndex the index of the field up to which the segment length is calculated ; negative index counts back from last field @return the bit length of this segment up to and including the specified field or 0 if the field does not exist
pub fn bit_length_of_field(&self, field_index: isize) -> usize {
        /* Check provided index */
        let last_field_index = self.get_absolute_index(field_index);
        if last_field_index < 0 {
            return 0;
        }
        /* Calculate segment bit length */
        let mut bit_length = 0;
        for index in 0..last_field_index as usize {
            bit_length += self.fields[index].bit_length();
        }
        bit_length
    }
pub fn bit_length_of_field ( & self , field_index : isize ) -> usize { /* Check provided index */ let last_field_index = self . get_absolute_index ( field_index ) ; if last_field_index < 0 { return 0 ; } /* Calculate segment bit length */ let mut bit_length = 0 ; for index in 0 .. last_field_index as usize { bit_length += self . fields [ index ] . bit_length ( ) ; } bit_length }
Returns the bit length up to and including the specified field, excluding the last variable length field if not set
 @param fieldIndex the index of the field up to which the segment length is calculated; negative index counts back from last field
 @return the bit length of this segment up to and including the specified field, or 0 if the field does not exist
Returns the bit length up to and including the specified field excluding the last variable length field if not set @param fieldIndex the index of the field up to which the segment length is calculated ; negative index counts back from last field @return the bit length of this segment up to and including the specified field or 0 if the field does not exist
&self
field_index
isize
&self
field_index
isize