pub struct NameSeg(pub [u8; 4]);
Expand description
Four-character name segment, allowing underscores, uppercase letters, and digits (except at the beginning).
The ASL compiler uses underscores to pad the end of names shorter than 4 chars.
Tuple Fields§
§0: [u8; 4]
Trait Implementations§
Source§impl From<NameSeg> for NameString
impl From<NameSeg> for NameString
Source§fn from(n: NameSeg) -> NameString
fn from(n: NameSeg) -> NameString
Converts to this type from the input type.
Source§impl<'a> Parse<'a> for NameSeg
Grammar:
impl<'a> Parse<'a> for NameSeg
Grammar:
NameSeg := <LeadNameChar NameChar NameChar NameChar>
LeadNameChar := ‘A’-‘Z’ | ‘_’
DigitChar := ‘0’-‘9’
NameChar := DigitChar | LeadNameChar
Source§fn parse<E: AMLParseError<'a>>(
i: ParserState<'a>,
) -> AMLParseResult<'a, Self, E>
fn parse<E: AMLParseError<'a>>( i: ParserState<'a>, ) -> AMLParseResult<'a, Self, E>
Try to parse an object of this type from the given input and state. Read more
impl Copy for NameSeg
impl Eq for NameSeg
impl StructuralPartialEq for NameSeg
Auto Trait Implementations§
impl Freeze for NameSeg
impl RefUnwindSafe for NameSeg
impl Send for NameSeg
impl Sync for NameSeg
impl Unpin for NameSeg
impl UnwindSafe for NameSeg
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