pub fn chunk(
        &self,
        table_name: impl Into<String>,
        chunk_id: u32,
    ) -> Result<Arc<RwLock<Chunk>>> {
        let table_name = table_name.into();

        match self.tables.get(&table_name) {
            Some(table) => table.chunks.get(&chunk_id).cloned().context(UnknownChunk {
                partition_key: self.key(),
                table_name,
                chunk_id,
            }),
            None => UnknownTable {
                partition_key: self.key(),
                table_name,
            }
            .fail(),
        }
    }
/// Return an immutable chunk reference by chunk id
Return an immutable chunk reference by chunk id
Return an immutable chunk reference by chunk id
pub fn chunk(
        &self,
        table_name: impl Into<String>,
        chunk_id: u32,
    ) -> Result<Arc<RwLock<Chunk>>> {
        let table_name = table_name.into();
        match self.tables.get(&table_name) {
            Some(table) => table.chunks.get(&chunk_id).cloned().context(UnknownChunk {
                partition_key: self.key(),
                table_name,
                chunk_id,
            }),
            None => UnknownTable {
                partition_key: self.key(),
                table_name,
            }
            .fail(),
        }
    }
pub fn chunk ( & self , table_name : impl Into < String > , chunk_id : u32 , ) -> Result < Arc < RwLock < Chunk > > > { let table_name = table_name . into ( ) ; match self . tables . get ( & table_name ) { Some ( table ) => table . chunks . get ( & chunk_id ) . cloned ( ) . context ( UnknownChunk { partition_key : self . key ( ) , table_name , chunk_id , } ) , None => UnknownTable { partition_key : self . key ( ) , table_name , } . fail ( ) , } }
Return an immutable chunk reference by chunk id
Return an immutable chunk reference by chunk id
&self
table_name
impl Into<String>
chunk_id
u32
&self
table_name
impl Into<String>
chunk_id
u32