Lines Matching +full:segment +full:-
1 // SPDX-License-Identifier: Apache-2.0 OR MIT
26 fn from(segment: T) -> Self { in from()
31 path.segments.push_value(segment.into()); in from()
42 /// - the path has no leading colon,
43 /// - the number of path segments is 1,
44 /// - the first path segment has no angle bracketed or parenthesized
46 /// - the ident of the first path segment is equal to the given one.
54 /// fn get_serde_meta_item(attr: &Attribute) -> Result<Option<&TokenStream>> {
65 pub fn is_ident<I>(&self, ident: &I) -> bool in is_ident()
80 /// - the path has no leading colon,
81 /// - the number of path segments is 1, and
82 /// - the first path segment has no angle bracketed or parenthesized
84 pub fn get_ident(&self) -> Option<&Ident> { in get_ident()
98 pub fn require_ident(&self) -> Result<&Ident> { in require_ident()
110 /// A segment of a path together with any path arguments on that segment.
122 fn from(ident: T) -> Self { in from()
131 /// Angle bracketed or parenthesized arguments of a path segment.
139 /// The `(A, B) -> C` in `Fn(A, B) -> C`.
145 /// The `(A, B) -> C` in `Fn(A, B) -> C`.
151 fn default() -> Self { in default()
157 pub fn is_empty(&self) -> bool { in is_empty()
165 pub fn is_none(&self) -> bool { in is_none()
199 /// Angle bracketed arguments of a path segment: the `<K, V>` in `HashMap<K,
246 /// Arguments of a function path segment: the `(A, B) -> C` in `Fn(A,B) ->
312 fn parse(input: ParseStream) -> Result<Self> { in parse()
319 fn parse(input: ParseStream) -> Result<Self> { in parse()
341 let segment = ty.path.segments.pop().unwrap().into_value(); in parse() localVariable
342 let ident = segment.ident; in parse()
343 let generics = match segment.arguments { in parse()
367 let segment = ty.path.segments.pop().unwrap().into_value(); in parse() localVariable
369 ident: segment.ident, in parse()
370 generics: match segment.arguments { in parse()
411 pub(crate) fn const_argument(input: ParseStream) -> Result<Expr> { in const_argument()
456 pub fn parse_turbofish(input: ParseStream) -> Result<Self> { in parse_turbofish()
464 ) -> Result<Self> { in do_parse()
491 fn parse(input: ParseStream) -> Result<Self> { in parse()
499 fn parse(input: ParseStream) -> Result<Self> { in parse()
511 fn parse(input: ParseStream) -> Result<Self> { in parse()
517 fn parse_helper(input: ParseStream, expr_style: bool) -> Result<Self> { in parse_helper()
572 /// fn parse(input: ParseStream) -> Result<Self> {
581 pub fn parse_mod_style(input: ParseStream) -> Result<Self> { in parse_mod_style()
606 return Err(input.error("expected path segment after `::`")); in parse_mod_style()
613 pub(crate) fn parse_helper(input: ParseStream, expr_style: bool) -> Result<Self> { in parse_helper()
631 ) -> Result<()> { in parse_rest()
641 pub(crate) fn is_mod_style(&self) -> bool { in is_mod_style()
644 .all(|segment| segment.arguments.is_none()) in is_mod_style()
648 pub(crate) fn qpath(input: ParseStream, expr_style: bool) -> Result<(Option<QSelf>, Path)> { in qpath()
726 fn clone(&self) -> Self { in clone()
740 for segment in path.segments.pairs() { in print_path()
741 print_path_segment(tokens, segment.value(), style); in print_path()
742 segment.punct().to_tokens(tokens); in print_path()
753 fn print_path_segment(tokens: &mut TokenStream, segment: &PathSegment, style: PathStyle) { in print_path_segment()
754 segment.ident.to_tokens(tokens); in print_path_segment()
755 print_path_arguments(tokens, &segment.arguments, style); in print_path_segment()
923 for (i, segment) in segments.by_ref().take(pos).enumerate() { in print_qpath()
924 print_path_segment(tokens, segment.value(), PathStyle::AsWritten); in print_qpath()
928 segment.punct().to_tokens(tokens); in print_qpath()
934 for segment in segments { in print_qpath()
935 print_path_segment(tokens, segment.value(), style); in print_qpath()
936 segment.punct().to_tokens(tokens); in print_qpath()
955 fn span(&self) -> Span { in span()