Struct htsget_config::resolver::Resolver
source · pub struct Resolver { /* private fields */ }Expand description
A regex storage is a storage that matches ids using Regex.
Implementations§
source§impl Resolver
impl Resolver
sourcepub fn new(
storage: Storage,
regex: &str,
replacement_string: &str,
allow_guard: AllowGuard
) -> Result<Self, Error>
pub fn new( storage: Storage, regex: &str, replacement_string: &str, allow_guard: AllowGuard ) -> Result<Self, Error>
Create a new regex storage.
sourcepub fn resolvers_from_data_server_config(&mut self, config: &DataServerConfig)
pub fn resolvers_from_data_server_config(&mut self, config: &DataServerConfig)
Set the local resolvers from the data server config.
sourcepub fn get_match<'a>(
&'a self,
i: usize,
regex_match: &'a str
) -> Option<&'a str>
pub fn get_match<'a>( &'a self, i: usize, regex_match: &'a str ) -> Option<&'a str>
Get the match associated with the capture group at index i using the regex_match.
sourcepub fn substitution_string(&self) -> &str
pub fn substitution_string(&self) -> &str
Get the substitution string.
sourcepub fn allow_guard(&self) -> &AllowGuard
pub fn allow_guard(&self) -> &AllowGuard
Get the query guard.
sourcepub fn allow_formats(&self) -> &[Format]
pub fn allow_formats(&self) -> &[Format]
Get allow formats.
sourcepub fn allow_classes(&self) -> &[Class]
pub fn allow_classes(&self) -> &[Class]
Get allow classes.
sourcepub fn allow_interval(&self) -> Interval
pub fn allow_interval(&self) -> Interval
Get allow interval.
sourcepub fn allow_reference_names(&self) -> &ReferenceNames
pub fn allow_reference_names(&self) -> &ReferenceNames
Get allow reference names.
sourcepub fn allow_fields(&self) -> &Fields
pub fn allow_fields(&self) -> &Fields
Get allow fields.
Get allow tags.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Resolverwhere
Resolver: Default,
impl<'de> Deserialize<'de> for Resolverwhere Resolver: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl IdResolver for Resolver
impl IdResolver for Resolver
source§fn resolve_id(&self, query: &Query) -> Option<ResolvedId>
fn resolve_id(&self, query: &Query) -> Option<ResolvedId>
Resolve the id, returning the substituted string if there is a match.
source§impl StorageResolver for Resolver
impl StorageResolver for Resolver
source§fn resolve_request<'life0, 'life1, 'async_trait, T>(
&'life0 self,
query: &'life1 mut Query
) -> Pin<Box<dyn Future<Output = Option<Result<Response>>> + Send + 'async_trait>>where
T: 'async_trait + ResolveResponse,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_request<'life0, 'life1, 'async_trait, T>( &'life0 self, query: &'life1 mut Query ) -> Pin<Box<dyn Future<Output = Option<Result<Response>>> + Send + 'async_trait>>where T: 'async_trait + ResolveResponse, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Resolve a request into a response.
Auto Trait Implementations§
impl RefUnwindSafe for Resolver
impl Send for Resolver
impl Sync for Resolver
impl Unpin for Resolver
impl UnwindSafe for Resolver
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more