pub struct Cells { /* private fields */ }Expand description
The fleet’s cell tables, scalar and text. Cheap to clone.
Implementations§
Source§impl Cells
impl Cells
pub fn new(fleet: Arc<Fleet>) -> Result<Self>
Sourcepub fn allocate_text(&self, initial: &str) -> Result<Text>
pub fn allocate_text(&self, initial: &str) -> Result<Text>
Take a text cell holding initial; up to CELL_TEXT_MAX bytes.
pub fn release_text(&self, id: TextId) -> Result<()>
pub fn is_text_live(&self, id: TextId) -> bool
Sourcepub fn allocate<T: CellType>(&self, initial: T) -> Result<Orbital<T>>
pub fn allocate<T: CellType>(&self, initial: T) -> Result<Orbital<T>>
Take a free slot, stamp it with T and initial, and return the
handle. The id inside it is what other processes open.
Sourcepub fn open<T: CellType>(&self, id: CellId) -> Result<Orbital<T>>
pub fn open<T: CellType>(&self, id: CellId) -> Result<Orbital<T>>
A handle to a live cell of type T.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Cells
impl !UnwindSafe for Cells
impl Freeze for Cells
impl Send for Cells
impl Sync for Cells
impl Unpin for Cells
impl UnsafeUnpin for Cells
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