pub trait NamedTypeLinks {
Show 24 methods
// Required methods
fn create(&mut self, source: u32, target: u32) -> u32;
fn ensure_created(&mut self, id: u32) -> u32;
fn get_link(&mut self, id: u32) -> Option<Link>;
fn exists(&mut self, id: u32) -> bool;
fn update(&mut self, id: u32, source: u32, target: u32) -> Result<Link>;
fn delete(&mut self, id: u32) -> Result<Link>;
fn all_links(&mut self) -> Vec<Link>;
fn search(&mut self, source: u32, target: u32) -> Option<u32>;
fn get_or_create(&mut self, source: u32, target: u32) -> u32;
fn get_name(&mut self, id: u32) -> Result<Option<String>>;
fn set_name(&mut self, id: u32, name: &str) -> Result<u32>;
fn get_by_name(&mut self, name: &str) -> Result<Option<u32>>;
fn remove_name(&mut self, id: u32) -> Result<()>;
fn save(&mut self) -> Result<()>;
// Provided methods
fn try_ensure_created(&mut self, id: u32) -> Result<u32> { ... }
fn get_or_create_named(&mut self, name: &str) -> Result<u32> { ... }
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<()> { ... }
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> { ... }
}Required Methods§
fn create(&mut self, source: u32, target: u32) -> u32
fn ensure_created(&mut self, id: u32) -> u32
fn get_link(&mut self, id: u32) -> Option<Link>
fn exists(&mut self, id: u32) -> bool
fn update(&mut self, id: u32, source: u32, target: u32) -> Result<Link>
fn delete(&mut self, id: u32) -> Result<Link>
fn all_links(&mut self) -> Vec<Link>
fn search(&mut self, source: u32, target: u32) -> Option<u32>
fn get_or_create(&mut self, source: u32, target: u32) -> u32
fn get_name(&mut self, id: u32) -> Result<Option<String>>
fn set_name(&mut self, id: u32, name: &str) -> Result<u32>
fn get_by_name(&mut self, name: &str) -> Result<Option<u32>>
fn remove_name(&mut self, id: u32) -> Result<()>
fn save(&mut self) -> Result<()>
Provided Methods§
fn try_ensure_created(&mut self, id: u32) -> Result<u32>
fn get_or_create_named(&mut self, name: &str) -> Result<u32>
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<()>
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>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.