Skip to content

Explore interior mutability #79

@jonathanpallant

Description

@jonathanpallant

Now that critical-section is a thing, maybe we can consider interior mutability:

  • Volume can hold an &VolumeManager
  • Directory and File can hold an &Volume
let volume = volume_mgr.get_volume(VolumeIdx(0))?;
let root_dir = volume.open_root_dir()?;
let file = root_dir.open("HELLO.TXT")?;
let mut buffer = [0u8; 64];
let contents = file.read_to_buffer(&mut buffer)?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions