[][src]Trait registry_api::CrateProvider

pub trait CrateProvider: Send + Sync + 'static {
#[must_use]    fn index<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<IndexCrate>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn check_name_availability<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        version: Option<&'life2 Version>
    ) -> Pin<Box<dyn Future<Output = Result<Option<RegistryCrate>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn publish<'life0, 'async_trait>(
        &'life0 self,
        ccrate: RegistryCrate
    ) -> Pin<Box<dyn Future<Output = Result<Warnings>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn yank<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        version: &'life2 Version
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn unyank<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        version: &'life2 Version
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn update_owners<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        version: &'life2 Version,
        owners: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn search<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        count: u32
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Required methods

#[must_use]fn index<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<IndexCrate>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

used to serve git endpoint for crate index, internal caller or unauthenticated

#[must_use]fn check_name_availability<'life0, 'life1, 'async_trait>(
    &'life0 self,
    name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

used to check if a name is available or a new or existing crate. use this to check for partial conflicts. authenticated.

#[must_use]fn get<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    name: &'life1 str,
    version: Option<&'life2 Version>
) -> Pin<Box<dyn Future<Output = Result<Option<RegistryCrate>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

general purpose crate information source, unauthenticated. If version is None, then fetch latest version.

#[must_use]fn publish<'life0, 'async_trait>(
    &'life0 self,
    ccrate: RegistryCrate
) -> Pin<Box<dyn Future<Output = Result<Warnings>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

publish a new crate version, authenticated for new crates, authorized for existing crates

#[must_use]fn yank<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    name: &'life1 str,
    version: &'life2 Version
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

yank a crate version, authorized

#[must_use]fn unyank<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    name: &'life1 str,
    version: &'life2 Version
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

unyank a crate version, authorized

#[must_use]fn update_owners<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    name: &'life1 str,
    version: &'life2 Version,
    owners: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

update owners on a crate, authorized

#[must_use]fn search<'life0, 'life1, 'async_trait>(
    &'life0 self,
    query: &'life1 str,
    count: u32
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

search for crates, unauthenticated

Loading content...

Implementors

Loading content...