pub struct UnionLinks<'a> { /* private fields */ }Expand description
Networks seen as one; see the module documentation.
Implementations§
Source§impl<'a> UnionLinks<'a>
impl<'a> UnionLinks<'a>
Sourcepub fn new(members: Vec<UnionMember<'a>>) -> Result<Self>
pub fn new(members: Vec<UnionMember<'a>>) -> Result<Self>
The networks members, the primary one first.
Sourcepub fn members(&self) -> &[UnionMember<'a>] ⓘ
pub fn members(&self) -> &[UnionMember<'a>] ⓘ
The networks, the primary one first.
Sourcepub fn members_mut(&mut self) -> &mut [UnionMember<'a>] ⓘ
pub fn members_mut(&mut self) -> &mut [UnionMember<'a>] ⓘ
The networks, the primary one first.
Sourcepub fn primary(&mut self) -> &mut (dyn NamedTypeLinks + 'a)
pub fn primary(&mut self) -> &mut (dyn NamedTypeLinks + 'a)
The member new links are created in.
Trait Implementations§
Source§impl NamedTypeLinks for UnionLinks<'_>
impl NamedTypeLinks for UnionLinks<'_>
Source§fn claims(&mut self, id: u32) -> Option<bool>
fn claims(&mut self, id: u32) -> Option<bool>
A plain member has every address; a composed one those it claims.
Source§fn get_name(&mut self, id: u32) -> Result<Option<String>>
fn get_name(&mut self, id: u32) -> Result<Option<String>>
The name of id in the member that has it, else in the first member
that names it.
Source§fn set_name(&mut self, id: u32, name: &str) -> Result<u32>
fn set_name(&mut self, id: u32, name: &str) -> Result<u32>
Names id in the member that has it, the primary one when none does.
Source§fn get_by_name(&mut self, name: &str) -> Result<Option<u32>>
fn get_by_name(&mut self, name: &str) -> Result<Option<u32>>
The link of name in the first member that has a link of that name
it does not shadow.
Source§fn remove_name(&mut self, id: u32) -> Result<()>
fn remove_name(&mut self, id: u32) -> Result<()>
Unnames id in the member that has it, the primary one when none does.
fn create(&mut self, source: u32, target: u32) -> u32
fn ensure_created(&mut self, id: u32) -> u32
fn try_ensure_created(&mut self, id: u32) -> Result<u32>
fn get_link(&mut self, id: u32) -> Option<Link>
fn exists(&mut self, id: u32) -> bool
Source§fn try_create(&mut self, source: u32, target: u32) -> Result<u32>
fn try_create(&mut self, source: u32, target: u32) -> Result<u32>
Self::create for a layer that may refuse it, as a
PermissionsDecorator
does: the query processor and the type hierarchy create through it.Source§fn reference_exists(&mut self, id: u32) -> bool
fn reference_exists(&mut self, id: u32) -> bool
Whether a reference of a query to
id names a link that exists. Read moreSource§fn next_created_addresses(&mut self, count: usize) -> Result<Vec<u32>>
fn next_created_addresses(&mut self, count: usize) -> Result<Vec<u32>>
The addresses the next
count links created in the store get. Read moreSource§fn update_observed(
&mut self,
id: u32,
source: u32,
target: u32,
observer: ChangeObserver<'_>,
) -> Result<Link>
fn update_observed( &mut self, id: u32, source: u32, target: u32, observer: ChangeObserver<'_>, ) -> Result<Link>
Self::update, reporting every change the update caused. Read moreSource§fn delete_observed(
&mut self,
id: u32,
observer: ChangeObserver<'_>,
) -> Result<Link>
fn delete_observed( &mut self, id: u32, observer: ChangeObserver<'_>, ) -> Result<Link>
Self::delete, reporting every change the deletion caused. Read morefn all_links(&mut self) -> Vec<Link> ⓘ
Source§fn query_links(
&mut self,
index: Option<u32>,
source: Option<u32>,
target: Option<u32>,
) -> Vec<Link> ⓘ
fn query_links( &mut self, index: Option<u32>, source: Option<u32>, target: Option<u32>, ) -> Vec<Link> ⓘ
The links that match a pattern, where
None matches any value, in
the order of their addresses. Read morefn search(&mut self, source: u32, target: u32) -> Option<u32>
fn get_or_create(&mut self, source: u32, target: u32) -> u32
fn save(&mut self) -> Result<()>
fn get_or_create_named(&mut self, name: &str) -> Result<u32>
Source§fn try_get_or_create(&mut self, source: u32, target: u32) -> Result<u32>
fn try_get_or_create(&mut self, source: u32, target: u32) -> Result<u32>
Self::get_or_create for a layer that may refuse it.fn update(&mut self, id: u32, source: u32, target: u32) -> Result<Link>
fn delete(&mut self, id: u32) -> Result<Link>
fn format_reference(&mut self, id: u32) -> Result<String>
fn format_lino(&mut self, link: &Link) -> Result<String>
fn lino_lines(&mut self) -> Result<Vec<String>>
fn write_lino_output<P: AsRef<Path>>(&mut self, path: P) -> Result<()>where
Self: Sized,
fn print_all_lino(&mut self) -> Result<()>
fn print_change_lino( &mut self, before: &Option<Link>, after: &Option<Link>, ) -> Result<()>
fn format_structure(&mut self, id: u32) -> Result<String>
fn format_structure_recursive( &mut self, id: u32, visited: &mut HashSet<u32>, ) -> Result<String>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for UnionLinks<'a>
impl<'a> !Send for UnionLinks<'a>
impl<'a> !Sync for UnionLinks<'a>
impl<'a> !UnwindSafe for UnionLinks<'a>
impl<'a> Freeze for UnionLinks<'a>
impl<'a> Unpin for UnionLinks<'a>
impl<'a> UnsafeUnpin for UnionLinks<'a>
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