Struct doublets_decorators::UniqueValidator
source · [−]Implementations
Trait Implementations
sourceimpl<T: LinkType, L: Doublets<T>> Doublets<T> for UniqueValidator<T, L>
impl<T: LinkType, L: Doublets<T>> Doublets<T> for UniqueValidator<T, L>
fn constants(&self) -> LinksConstants<T>
fn count_by(&self, query: impl ToQuery<T>) -> T
fn create_by_with<F, R>(
&mut self,
query: impl ToQuery<T>,
handler: F
) -> Result<R, Error<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn try_each_by<F, R>(&self, restrictions: impl ToQuery<T>, handler: F) -> R where
F: FnMut(Link<T>) -> R,
R: Try<Output = ()>,
fn update_by_with<F, R>(
&mut self,
query: impl ToQuery<T>,
replacement: impl ToQuery<T>,
handler: F
) -> Result<R, Error<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn delete_by_with<F, R>(
&mut self,
query: impl ToQuery<T>,
handler: F
) -> Result<R, Error<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn count(&self) -> T
fn create_by(&mut self, query: impl ToQuery<T>) -> Result<T, LinksError<T>>
fn create_with<F, R>(&mut self, handler: F) -> Result<R, LinksError<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn create(&mut self) -> Result<T, LinksError<T>>
fn try_each<F, R>(&self, handler: F) -> R where
F: FnMut(Link<T>) -> R,
R: Try<Output = ()>,
fn each_by<H>(&self, restrictions: impl ToQuery<T>, handler: H) -> T where
H: FnMut(Link<T>) -> T,
fn each<H>(&self, handler: H) -> T where
H: FnMut(Link<T>) -> T,
fn update_by(
&mut self,
query: impl ToQuery<T>,
replacement: impl ToQuery<T>
) -> Result<T, LinksError<T>>
fn update_with<F, R>(
&mut self,
index: T,
source: T,
target: T,
handler: F
) -> Result<R, LinksError<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn update(&mut self, index: T, source: T, target: T) -> Result<T, LinksError<T>>
fn delete_by(&mut self, query: impl ToQuery<T>) -> Result<T, LinksError<T>>
fn delete_with<F, R>(
&mut self,
index: T,
handler: F
) -> Result<R, LinksError<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn delete(&mut self, index: T) -> Result<T, LinksError<T>>
fn try_get_link(&self, index: T) -> Result<Link<T>, LinksError<T>>
fn get_link(&self, index: T) -> Option<Link<T>>
fn delete_all(&mut self) -> Result<(), LinksError<T>>
fn delete_query_with<F, R>(
&mut self,
query: impl ToQuery<T>,
handler: F
) -> Result<(), LinksError<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn delete_usages_with<F, R>(
&mut self,
index: T,
handler: F
) -> Result<(), LinksError<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn delete_usages(&mut self, index: T) -> Result<(), LinksError<T>>
fn create_point(&mut self) -> Result<T, LinksError<T>>
sourcefn create_and_update(
&mut self,
source: T,
target: T
) -> Result<T, LinksError<T>>
fn create_and_update(
&mut self,
source: T,
target: T
) -> Result<T, LinksError<T>>
👎 Deprecated:
use create_link instead
fn create_link_with<F, R>(
&mut self,
source: T,
target: T,
handler: F
) -> Result<Flow, LinksError<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn create_link(&mut self, source: T, target: T) -> Result<T, LinksError<T>>
sourcefn search_or(&self, source: T, target: T, or: T) -> T
fn search_or(&self, source: T, target: T, or: T) -> T
👎 Deprecated:
use links.search(source, target).unwrap_or(or)
fn found(&self, query: impl ToQuery<T>) -> bool
fn find(&self, query: impl ToQuery<T>) -> Option<T>
fn search(&self, source: T, target: T) -> Option<T>
fn single(&self, query: impl ToQuery<T>) -> Option<Link<T>>
fn all_indices(&self, query: impl ToQuery<T>) -> Vec<T, Global>
fn get_or_create(&mut self, source: T, target: T) -> Result<T, LinksError<T>>
fn count_usages(&self, index: T) -> Result<T, LinksError<T>>
fn usages(&self, index: T) -> Result<Vec<T, Global>, LinksError<T>>
fn exist(&self, link: T) -> bool
fn has_usages(&self, link: T) -> bool
fn rebase_with<F, R>(
&mut self,
old: T,
new: T,
handler: F
) -> Result<(), LinksError<T>> where
F: FnMut(Link<T>, Link<T>) -> R,
R: Try<Output = ()>,
fn rebase(&mut self, old: T, new: T) -> Result<T, LinksError<T>>
fn rebase_and_delete(&mut self, old: T, new: T) -> Result<T, LinksError<T>>
fn reset(&mut self, link: T) -> Result<T, LinksError<T>>
fn format(&self, link: T) -> Option<String>
sourcefn is_full_point(&self, link: T) -> Option<bool>
fn is_full_point(&self, link: T) -> Option<bool>
👎 Deprecated:
use links.try_get_link(...)?.is_full()
sourcefn is_partial_point(&self, link: T) -> Option<bool>
fn is_partial_point(&self, link: T) -> Option<bool>
👎 Deprecated:
use links.try_get_link(...)?.is_partial()
sourcefn continue_break(&self) -> (T, T)
fn continue_break(&self) -> (T, T)
👎 Deprecated:
only development
Auto Trait Implementations
impl<T, L> RefUnwindSafe for UniqueValidator<T, L> where
L: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, L> Send for UniqueValidator<T, L> where
L: Send,
impl<T, L> Sync for UniqueValidator<T, L> where
L: Sync,
impl<T, L> Unpin for UniqueValidator<T, L> where
L: Unpin,
T: Unpin,
impl<T, L> UnwindSafe for UniqueValidator<T, L> where
L: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more