pub fn insert_at<L>(&mut self, data: T, location: &L)
    where
        R: Eq + Hash + Clone,
        L: Loc<RefID = R>,
    {
        let itree = self
            .refid_itrees
            .entry(location.refid().clone())
            .or_insert_with(IntervalTree::new);
        let rng = location.start()..(location.start() + (location.length() as isize));
        itree.insert(rng, data);
    }
/// Insert an object into the container at a specified location (`Loc`).
///
/// # Arguments
///
/// * `data` - any type of data to be inserted at the location / region
/// * `location` - any object with the `Loc` trait implemented, determining
///   the Range at which to insert the `data`
///
/// # Example
///
/// ```
/// extern crate bio_types;
/// use bio::data_structures::annot_map::AnnotMap;
/// use bio_types::annot::contig::Contig;
/// use bio_types::strand::ReqStrand;
///
/// let mut genes: AnnotMap<String, String> = AnnotMap::new();
/// let tma22 = Contig::new(
///     "chrX".to_owned(),
///     461829,
///     462426 - 461829,
///     ReqStrand::Forward,
/// );
/// genes.insert_at("TMA22".to_owned(), &tma22);
/// ```
Insert an object into the container at a specified location (`Loc`).
Insert an object into the container at a specified location ( ` Loc ` ) .
pub fn insert_at<L>(&mut self, data: T, location: &L)
    where
        R: Eq + Hash + Clone,
        L: Loc<RefID = R>,
    {
        let itree = self
            .refid_itrees
            .entry(location.refid().clone())
            .or_insert_with(IntervalTree::new);
        let rng = location.start()..(location.start() + (location.length() as isize));
        itree.insert(rng, data);
    }
pub fn insert_at < L > ( & mut self , data : T , location : & L ) where R : Eq + Hash + Clone , L : Loc < RefID = R > , { let itree = self . refid_itrees . entry ( location . refid ( ) . clone ( ) ) . or_insert_with ( IntervalTree :: new ) ; let rng = location . start ( ) .. ( location . start ( ) + ( location . length ( ) as isize ) ) ; itree . insert ( rng , data ) ; }
Insert an object into the container at a specified location (`Loc`).
Insert an object into the container at a specified location ( ` Loc ` ) .
&mut self
data
T
location
&L
&mut self
data
T
location
&L
example
```
extern crate bio_types;
use bio::data_structures::annot_map::AnnotMap;
use bio_types::annot::contig::Contig;
use bio_types::strand::ReqStrand.


` ` ` extern crate bio_types ; use bio :: data_structures :: annot_map :: AnnotMap ; use bio_types :: annot :: contig :: Contig ; use bio_types :: strand :: ReqStrand .