blackbeam / rust-marc

Apache License 2.0
16 stars 5 forks source link

Get indicator about a Tag #8

Closed universon123 closed 3 years ago

universon123 commented 3 years ago

Hey Anatoly: in lib.rs file,about this test at sholud_build_record(),for example:
"100", "1 ", [ 'a' => "'Абд Ал-'Азиз Джа'фар Бин 'Акид", ], i dont't know how to get "1 " above; please help me! thank you!

blackbeam commented 3 years ago

Hi. You can get it by looking at the first two bytes of a data field data:

let indicator = some_data_field
    .get_data::<[u8]>()
    .get(..2)
    .map(Indicator::from_slice);