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§