Home
last modified time | relevance | path

Searched refs:RustPathComponent (Results 1 – 5 of 5) sorted by relevance

/external/rust/crates/protobuf-codegen/src/gen/rust/
Dcomponent.rs8 pub(crate) enum RustPathComponent { enum
13 impl fmt::Display for RustPathComponent { implementation
16 RustPathComponent::Ident(ident) => write!(f, "{}", ident), in fmt()
17 RustPathComponent::Keyword(keyword) => write!(f, "{}", keyword), in fmt()
22 impl RustPathComponent { implementation
23 pub(crate) const SUPER: RustPathComponent = RustPathComponent::Keyword("super");
25 pub(crate) fn parse(s: &str) -> RustPathComponent { in parse() argument
27 RustPathComponent::Ident(RustIdent::new(&s[2..])) in parse()
29 RustPathComponent::Keyword(kw) in parse()
31 RustPathComponent::Ident(RustIdent::new(s)) in parse()
Drel_path.rs4 use crate::gen::rust::component::RustPathComponent;
10 pub(crate) path: Vec<RustPathComponent>,
25 pub fn from_components<I: IntoIterator<Item = RustPathComponent>>(i: I) -> RustRelativePath { in from_components()
32 Self::from_components(i.into_iter().map(RustPathComponent::Ident)) in from_idents()
39 pub fn first(&self) -> Option<RustPathComponent> { in first() argument
43 pub fn remove_first(&mut self) -> Option<RustPathComponent> { in remove_first() argument
52 self.path.insert(0, RustPathComponent::Ident(ident)); in prepend_ident()
63 self.path.push(RustPathComponent::Ident(ident)); in push_ident()
73 iter::repeat(RustPathComponent::SUPER).take(self.path.len()), in to_reverse()
94 path: s.split("::").map(RustPathComponent::parse).collect(), in from()
Dpath.rs3 use crate::gen::rust::component::RustPathComponent;
27 pub fn first(&self) -> Option<RustPathComponent> { in first() argument
32 pub fn remove_first(&mut self) -> Option<RustPathComponent> { in remove_first() argument
53 pub(crate) fn append_component(mut self, component: RustPathComponent) -> RustPath { in append_component()
59 self.append_component(RustPathComponent::Ident(ident)) in append_ident()
Dident_with_path.rs3 use crate::gen::rust::component::RustPathComponent;
18 Some(RustPathComponent::Ident(ident)) => ident, in new()
19 Some(RustPathComponent::Keyword(kw)) => { in new()
/external/rust/crates/protobuf-codegen/src/gen/
Drust_types_values.rs15 use crate::gen::rust::component::RustPathComponent;
520 .append_component(RustPathComponent::SUPER) in message_or_enum_to_rust_relative()