pub enum RootEntry<'a> {
Comment(Comment<'a>),
Syntax(Cow<'a, str>),
Package(Cow<'a, str>),
Import(Cow<'a, str>),
Option(Option<'a>),
Service(Service<'a>),
Message(Message<'a>),
Extend(Extend<'a>),
Enum(Enum<'a>),
}Expand description
Top-level entries in a .proto file.
§Examples
use protobuf_ast_parser::ast::{RootEntry, Comment};
let entry = RootEntry::from(Comment::single_line("// hi"));Variants§
Comment(Comment<'a>)
Syntax(Cow<'a, str>)
Package(Cow<'a, str>)
Import(Cow<'a, str>)
Option(Option<'a>)
Service(Service<'a>)
Message(Message<'a>)
Extend(Extend<'a>)
Enum(Enum<'a>)
Implementations§
Trait Implementations§
impl<'a> StructuralPartialEq for RootEntry<'a>
Auto Trait Implementations§
impl<'a> Freeze for RootEntry<'a>
impl<'a> RefUnwindSafe for RootEntry<'a>
impl<'a> Send for RootEntry<'a>
impl<'a> Sync for RootEntry<'a>
impl<'a> Unpin for RootEntry<'a>
impl<'a> UnwindSafe for RootEntry<'a>
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