Lines Matching defs:mode

167 	/// This function always encodes using the binary segment mode, not any text mode. The maximum number of
244 bb.append_bits(seg.mode.mode_bits(), 4);
245 bb.append_bits(u32::try_from(seg.numchars).unwrap(), seg.mode.num_char_count_bits(version));
952 // The mode indicator of this segment. Accessed through mode().
953 mode: QrSegmentMode,
956 // numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.
970 /// Returns a segment representing the given binary data encoded in byte mode.
974 /// Any text string can be converted to UTF-8 bytes and encoded as a byte mode segment.
984 /// Returns a segment representing the given string of decimal digits encoded in numeric mode.
1008 /// Returns a segment representing the given text string encoded in alphanumeric mode.
1020 .expect("String contains unencodable characters in alphanumeric mode");
1080 /// The character count (numchars) must agree with the mode and
1082 pub fn new(mode: QrSegmentMode, numchars: usize, data: Vec<bool>) -> Self {
1083 Self { mode, numchars, data }
1089 /// Returns the mode indicator of this segment.
1090 pub fn mode(&self) -> QrSegmentMode {
1091 self.mode
1115 let ccbits: u8 = seg.mode.num_char_count_bits(version);
1129 /// Tests whether the given string can be encoded as a segment in numeric mode.
1137 /// Tests whether the given string can be encoded as a segment in alphanumeric mode.
1148 // The set of all legal characters in alphanumeric mode,
1170 // representing the mode indicator bits for this mode object.
1183 // Returns the bit width of the character count field for a segment in this mode
1232 /// - Change the text to fit the character set of a particular segment mode (e.g. alphanumeric).