pub struct Segment {
pub mode: Mode,
pub data: Vec<u8>,
}Expand description
One mode-tagged piece of a symbol’s payload.
The interpretation of Segment::data depends on Segment::mode:
Numeric→ ASCII digit bytes (b'0'..=b'9').Alphanumeric→ ASCII bytes from the alphanumeric set.Byte→ raw payload bytes as stored in the symbol.Kanji→ the source Shift-JIS bytes (2 per character).Eci→ empty; the assignment lives in the mode.
Fields§
§mode: ModeHow Segment::data is encoded.
data: Vec<u8>The raw payload for this segment (see type docs for interpretation).
Implementations§
Trait Implementations§
impl Eq for Segment
impl StructuralPartialEq for Segment
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more