pin_project_internal::utils

Trait SliceExt

Source
pub(crate) trait SliceExt {
    // Required methods
    fn position_exact(&self, ident: &str) -> Result<Option<usize>>;
    fn find(&self, ident: &str) -> Option<&Attribute>;
}

Required Methods§

Source

fn position_exact(&self, ident: &str) -> Result<Option<usize>>

Source

fn find(&self, ident: &str) -> Option<&Attribute>

Implementations on Foreign Types§

Source§

impl SliceExt for [Attribute]

Source§

fn position_exact(&self, ident: &str) -> Result<Option<usize>>

§Errors
  • There are multiple specified attributes.
  • The Attribute::tokens field of the specified attribute is not empty.
Source§

fn find(&self, ident: &str) -> Option<&Attribute>

Implementors§