pub struct JobCatalogScheduleSyncScope { /* private fields */ }Expand description
Explicit owned schedule-name scope used by exact catalog schedule sync.
Exact sync only deactivates schedules whose names are in this scope, and it rejects synced specs whose names are outside the scope. Use this to describe the deployment-owned schedule names that may be made inactive when omitted from the current catalog.
§Example
use runledger_runtime::catalog::JobCatalogScheduleSyncScope;
let scope = JobCatalogScheduleSyncScope::schedule_names([
"profiles.refresh.hourly",
"profiles.refresh.daily",
])?;
Implementations§
Source§impl JobCatalogScheduleSyncScope
impl JobCatalogScheduleSyncScope
Sourcepub fn schedule_name(name: impl Into<String>) -> Result<Self, CatalogError>
pub fn schedule_name(name: impl Into<String>) -> Result<Self, CatalogError>
Builds a scope containing one owned schedule name.
§Errors
Returns CatalogError::InvalidExactScheduleSyncScopeName when name
is blank or has surrounding whitespace.
Sourcepub fn schedule_names<I, S>(schedule_names: I) -> Result<Self, CatalogError>
pub fn schedule_names<I, S>(schedule_names: I) -> Result<Self, CatalogError>
Builds a scope containing one or more owned schedule names.
Duplicate names are rejected instead of silently coalesced so callers can catch ownership-list mistakes during startup. Whitespace-only names are reported as invalid names rather than as an empty scope.
§Errors
Returns CatalogError::InvalidExactScheduleSyncScope when no schedule
name is provided, or CatalogError::InvalidExactScheduleSyncScopeName
when any name is blank or has surrounding whitespace.
Trait Implementations§
Source§impl Clone for JobCatalogScheduleSyncScope
impl Clone for JobCatalogScheduleSyncScope
Source§fn clone(&self) -> JobCatalogScheduleSyncScope
fn clone(&self) -> JobCatalogScheduleSyncScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JobCatalogScheduleSyncScope
impl Debug for JobCatalogScheduleSyncScope
impl Eq for JobCatalogScheduleSyncScope
Source§impl PartialEq for JobCatalogScheduleSyncScope
impl PartialEq for JobCatalogScheduleSyncScope
Source§fn eq(&self, other: &JobCatalogScheduleSyncScope) -> bool
fn eq(&self, other: &JobCatalogScheduleSyncScope) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JobCatalogScheduleSyncScope
Auto Trait Implementations§
impl Freeze for JobCatalogScheduleSyncScope
impl RefUnwindSafe for JobCatalogScheduleSyncScope
impl Send for JobCatalogScheduleSyncScope
impl Sync for JobCatalogScheduleSyncScope
impl Unpin for JobCatalogScheduleSyncScope
impl UnsafeUnpin for JobCatalogScheduleSyncScope
impl UnwindSafe for JobCatalogScheduleSyncScope
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> 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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<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