Trait rusqbin::storage::Bins [] [src]

pub trait Bins {
    fn create_bin(&mut self) -> BinSummary;
    fn delete_bin(&mut self, id: &Id) -> DeleteBinStatus;
    fn get_bin<'a>(&'a self, id: &'a Id) -> Option<&Bin>;
    fn get_bin_summary(&self, id: &Id) -> Option<BinSummary>;
    fn get_bin_summaries(&self) -> HashMap<Id, BinSummary>;
    fn insert_request(
        &mut self,
        id: &Id,
        request: Request
    ) -> InsertRequestStatus; }

Trait for storage operations for Requests.

Required Methods

Returns a BinSummary of a newly-reated bin. The Id in the summary must be unique at the time of creation.

Delete a bin by Id

Get a bin (not just a summary) by Id

Get a bin summary by Id

Get bin summaries for all currently-stored bins

Insert a request into a Bin using a bin Id.

Implementors