pub struct RootConfig {
pub default_config: Option<Config>,
pub projects: Option<Vec<ProjectConfig>>,
}Fields§
§default_config: Option<Config>§projects: Option<Vec<ProjectConfig>>Implementations§
Source§impl RootConfig
impl RootConfig
Sourcepub fn get_project<'a>(
&'a self,
request_path: &PathBuf,
) -> Option<&'a ProjectConfig>
pub fn get_project<'a>( &'a self, request_path: &PathBuf, ) -> Option<&'a ProjectConfig>
Sourcepub fn get_config<'a>(&'a self, req_uri: &'a Uri) -> &'a Config
pub fn get_config<'a>(&'a self, req_uri: &'a Uri) -> &'a Config
Returns the project-specific Config associated with uri, or the default if no
matching configuration is found
§Panics
Will panic if self does not have a valid configuration for req_uri, meaning
no default config and no applicable project config
Sourcepub fn effective_arches(&self) -> Vec<Arch>
pub fn effective_arches(&self) -> Vec<Arch>
§Panics
Will panic if self.default_config is None
Sourcepub fn effective_assemblers(&self) -> Vec<Assembler>
pub fn effective_assemblers(&self) -> Vec<Assembler>
§Panics
Will panic if self.default_config is None
pub fn is_isa_enabled(&self, isa: Arch) -> bool
pub fn is_assembler_enabled(&self, assembler: Assembler) -> bool
Trait Implementations§
Source§impl Clone for RootConfig
impl Clone for RootConfig
Source§fn clone(&self) -> RootConfig
fn clone(&self) -> RootConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RootConfig
impl Debug for RootConfig
Source§impl Default for RootConfig
impl Default for RootConfig
Source§impl<'de> Deserialize<'de> for RootConfig
impl<'de> Deserialize<'de> for RootConfig
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 JsonSchema for RootConfig
impl JsonSchema for RootConfig
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for RootConfig
impl PartialEq for RootConfig
Source§impl Serialize for RootConfig
impl Serialize for RootConfig
impl Eq for RootConfig
impl StructuralPartialEq for RootConfig
Auto Trait Implementations§
impl Freeze for RootConfig
impl RefUnwindSafe for RootConfig
impl Send for RootConfig
impl Sync for RootConfig
impl Unpin for RootConfig
impl UnwindSafe for RootConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more