Trait PathHelpers

Source
pub trait PathHelpers {
    // Required methods
    fn new() -> Self;
    fn to_type(self) -> Type;
    fn from_ident<I: IntoIdent>(origin: I) -> Self;
    fn from_idents<I: IntoIdents>(origin: I) -> Self;
    fn push_segment<S: IntoSegment>(&mut self, segment: S) -> &mut Self;
    fn modify_segment_at<F: FnOnce(&mut PathSegment)>(
        &mut self,
        index: usize,
        modify: F,
    ) -> &mut Self;

    // Provided methods
    fn push_arg(&mut self, index: usize, typ: Type) -> &mut Self { ... }
    fn push_ident_arg(&mut self, index: usize, ident: Ident) -> &mut Self { ... }
}

Required Methods§

Source

fn new() -> Self

Source

fn to_type(self) -> Type

Source

fn from_ident<I: IntoIdent>(origin: I) -> Self

Source

fn from_idents<I: IntoIdents>(origin: I) -> Self

Source

fn push_segment<S: IntoSegment>(&mut self, segment: S) -> &mut Self

Source

fn modify_segment_at<F: FnOnce(&mut PathSegment)>( &mut self, index: usize, modify: F, ) -> &mut Self

Provided Methods§

Source

fn push_arg(&mut self, index: usize, typ: Type) -> &mut Self

Source

fn push_ident_arg(&mut self, index: usize, ident: Ident) -> &mut Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl PathHelpers for Path

Source§

fn new() -> Self

Source§

fn to_type(self) -> Type

Source§

fn from_ident<I: IntoIdent>(origin: I) -> Self

Source§

fn from_idents<I: IntoIdents>(origin: I) -> Self

Source§

fn push_segment<S: IntoSegment>(&mut self, segment: S) -> &mut Self

Source§

fn modify_segment_at<F: FnOnce(&mut PathSegment)>( &mut self, index: usize, modify: F, ) -> &mut Self

Implementors§