pub struct LocalConfig {
pub ontologies: HashSet<String>,
pub shapes: HashSet<String>,
pub disabled: HashSet<Disabled>,
pub prefix_disabled: HashSet<String>,
pub completion: CompletionConfig,
pub prefix_format: Option<PrefixFormat>,
pub closed_namespaces: HashSet<String>,
pub allowed_properties: HashSet<String>,
}Fields§
§ontologies: HashSet<String>Extra ontologies to import
shapes: HashSet<String>Extra shapes to import
disabled: HashSet<Disabled>Features to disable
prefix_disabled: HashSet<String>disable which prefices from prefix.cc to show
completion: CompletionConfigconfiure completion behavior
prefix_format: Option<PrefixFormat>Preferred way to write Turtle/TriG prefix declarations when inserting them.
closed_namespaces: HashSet<String>Namespaces for which IRIs used as properties (predicates) must be defined in a
known ontology. Predicate IRIs that start with one of these namespaces but are
not a known property (and not in [allowed_properties]) are flagged with a warning.
allowed_properties: HashSet<String>User-approved property IRIs that should not be flagged by the
[closed_namespaces] validation, even though they are absent from the ontology.
Implementations§
Source§impl LocalConfig
impl LocalConfig
Sourcepub fn is_disabled(&self, d: Disabled) -> bool
pub fn is_disabled(&self, d: Disabled) -> bool
Whether the given feature/diagnostic has been disabled by the user.
Sourcepub fn combine(&mut self, other: LocalConfig)
pub fn combine(&mut self, other: LocalConfig)
Combines this config with another config, giving precedence to the other config
pub fn global_url() -> Option<Url>
pub async fn global(fs: &Fs) -> Option<Self>
Sourcepub async fn persist_allowed_property(fs: &Fs, iri: &str) -> Option<()>
pub async fn persist_allowed_property(fs: &Fs, iri: &str) -> Option<()>
Add iri to the global config’s allowed_properties array on disk,
preserving the rest of the existing global configuration. Used by the
swls.allowProperty command so the user’s choice survives restarts.
pub async fn local(fs: &Fs, url: &Url) -> Option<Self>
Trait Implementations§
Source§impl Debug for LocalConfig
impl Debug for LocalConfig
Source§impl Default for LocalConfig
impl Default for LocalConfig
Source§fn default() -> LocalConfig
fn default() -> LocalConfig
Source§impl<'de> Deserialize<'de> for LocalConfigwhere
LocalConfig: Default,
impl<'de> Deserialize<'de> for LocalConfigwhere
LocalConfig: 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>,
Auto Trait Implementations§
impl Freeze for LocalConfig
impl RefUnwindSafe for LocalConfig
impl Send for LocalConfig
impl Sync for LocalConfig
impl Unpin for LocalConfig
impl UnsafeUnpin for LocalConfig
impl UnwindSafe for LocalConfig
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more