pub struct SourceAttributeBuilder {
pub source_attributes: BTreeMap<String, HashSet<SourceAttributes>>,
pub source_name: Option<String>,
}Expand description
builder for the source information on a per record basis
Fields§
§source_attributes: BTreeMap<String, HashSet<SourceAttributes>>§source_name: Option<String>Implementations§
Source§impl SourceAttributeBuilder
impl SourceAttributeBuilder
pub fn get_start(&self, key: &str) -> Option<&RangeValue>
pub fn get_stop(&self, key: &str) -> Option<&RangeValue>
pub fn get_organism(&self, key: &str) -> Option<&String>
pub fn get_mol_type(&self, key: &str) -> Option<&String>
pub fn get_strain(&self, key: &str) -> Option<&String>
pub fn get_type_material(&self, key: &str) -> Option<&String>
pub fn get_db_xref(&self, key: &str) -> Option<&String>
Source§impl SourceAttributeBuilder
impl SourceAttributeBuilder
pub fn set_source_name(&mut self, name: String)
pub fn get_source_name(&self) -> Option<&String>
pub fn add_source_attribute(&mut self, key: String, attribute: SourceAttributes)
pub fn get_source_attributes( &self, key: &str, ) -> Option<&HashSet<SourceAttributes>>
Source§impl SourceAttributeBuilder
impl SourceAttributeBuilder
pub fn new() -> Self
pub fn set_counter(&mut self, counter: String) -> &mut Self
pub fn insert_to(&mut self, value: SourceAttributes)
pub fn set_start(&mut self, value: RangeValue) -> &mut Self
pub fn set_stop(&mut self, value: RangeValue) -> &mut Self
pub fn set_organism(&mut self, value: String) -> &mut Self
pub fn set_mol_type(&mut self, value: String) -> &mut Self
pub fn set_strain(&mut self, value: String) -> &mut Self
pub fn set_type_material(&mut self, value: String) -> &mut Self
pub fn set_db_xref(&mut self, value: String) -> &mut Self
pub fn build(self) -> BTreeMap<String, HashSet<SourceAttributes>>
pub fn iter_sorted(&self) -> Iter<'_, String, HashSet<SourceAttributes>>
pub fn default() -> Self
Trait Implementations§
Source§impl Clone for SourceAttributeBuilder
impl Clone for SourceAttributeBuilder
Source§fn clone(&self) -> SourceAttributeBuilder
fn clone(&self) -> SourceAttributeBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 SourceAttributeBuilder
impl Debug for SourceAttributeBuilder
Source§impl Default for SourceAttributeBuilder
impl Default for SourceAttributeBuilder
Source§fn default() -> SourceAttributeBuilder
fn default() -> SourceAttributeBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SourceAttributeBuilder
impl RefUnwindSafe for SourceAttributeBuilder
impl Send for SourceAttributeBuilder
impl Sync for SourceAttributeBuilder
impl Unpin for SourceAttributeBuilder
impl UnwindSafe for SourceAttributeBuilder
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,
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 moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.