Parse a flags value from text. This function will fail on any names that don't correspond to defined flags. Unknown bits will be ignored. */
(input: &str)
| 153 | Unknown bits will be ignored. |
| 154 | */ |
| 155 | pub fn from_str_truncate<B: Flags>(input: &str) -> Result<B, ParseError> |
| 156 | where |
| 157 | B::Bits: ParseHex, |
| 158 | { |
| 159 | Ok(B::from_bits_truncate(from_str::<B>(input)?.bits())) |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | Write only the contained, defined, named flags in a flags value as text. |