pub struct InstanceContext {
pub path_ignore_rules: Arc<Vec<PathIgnoreRule>>,
pub emit_legacy_scripts: bool,
pub sync_rules: Vec<SyncRule>,
}Fields§
§path_ignore_rules: Arc<Vec<PathIgnoreRule>>§emit_legacy_scripts: bool§sync_rules: Vec<SyncRule>Implementations§
Source§impl InstanceContext
impl InstanceContext
pub fn new() -> Self
pub fn with_emit_legacy_scripts(emit_legacy_scripts: Option<bool>) -> Self
Sourcepub fn add_path_ignore_rules<I>(&mut self, new_rules: I)
pub fn add_path_ignore_rules<I>(&mut self, new_rules: I)
Extend the list of ignore rules in the context with the given new rules.
Sourcepub fn add_sync_rules<I>(&mut self, new_rules: I)where
I: IntoIterator<Item = SyncRule>,
pub fn add_sync_rules<I>(&mut self, new_rules: I)where
I: IntoIterator<Item = SyncRule>,
Extend the list of syncing rules in the context with the given new rules.
Sourcepub fn clear_sync_rules(&mut self)
pub fn clear_sync_rules(&mut self)
Clears all sync rules for this InstanceContext
pub fn set_emit_legacy_scripts(&mut self, emit_legacy_scripts: bool)
Sourcepub fn get_user_sync_rule(&self, path: &Path) -> Option<&SyncRule>
pub fn get_user_sync_rule(&self, path: &Path) -> Option<&SyncRule>
Returns the middleware specified by the first sync rule that matches the provided path. This does not handle default syncing rules.
Trait Implementations§
Source§impl Clone for InstanceContext
impl Clone for InstanceContext
Source§fn clone(&self) -> InstanceContext
fn clone(&self) -> InstanceContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InstanceContext
impl Debug for InstanceContext
Source§impl Default for InstanceContext
impl Default for InstanceContext
Source§impl<'de> Deserialize<'de> for InstanceContext
impl<'de> Deserialize<'de> for InstanceContext
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 PartialEq for InstanceContext
impl PartialEq for InstanceContext
Source§fn eq(&self, other: &InstanceContext) -> bool
fn eq(&self, other: &InstanceContext) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InstanceContext
impl Serialize for InstanceContext
impl StructuralPartialEq for InstanceContext
Auto Trait Implementations§
impl Freeze for InstanceContext
impl RefUnwindSafe for InstanceContext
impl Send for InstanceContext
impl Sync for InstanceContext
impl Unpin for InstanceContext
impl UnsafeUnpin for InstanceContext
impl UnwindSafe for InstanceContext
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
Converts
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>
Converts
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