Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AerynOS/disks-rs
/ functions
Functions
213 in github.com/AerynOS/disks-rs
⨍
Functions
213
◇
Types & classes
84
↓ 16 callers
Method
add_request
Add a partition request to this strategy
crates/partitioning/src/strategy.rs:87
↓ 14 callers
Method
name
Returns the name of the block device.
crates/disks/src/lib.rs:128
↓ 13 callers
Method
add_partition
Add a partition to the mock disk at the specified byte offsets
crates/disks/src/mock.rs:55
↓ 13 callers
Method
current_layout
Returns the current effective layout after all pending changes
crates/partitioning/src/planner.rs:228
↓ 10 callers
Function
get_kdl_entry
(node: &'a KdlNode, id: &'a T)
crates/types/src/kdl_helpers.rs:70
↓ 8 callers
Method
size
Get the size of this region in bytes
crates/partitioning/src/planner.rs:119
↓ 7 callers
Function
create_mock_disk
Creates a mock disk with a typical size of 500GB
crates/partitioning/src/planner.rs:462
↓ 7 callers
Function
kdl_value_to_string
Get a string property from a value
crates/types/src/kdl_helpers.rs:84
↓ 7 callers
Method
write
Actually write changes to disk
crates/partitioning/src/writer.rs:101
↓ 6 callers
Function
get_property_str
Get a string property from a node
crates/types/src/kdl_helpers.rs:111
↓ 6 callers
Method
partitions
Returns the partitions on the block device.
crates/disks/src/lib.rs:60
↓ 6 callers
Function
read
Reads a value from a sysfs node and attempts to parse it to type T # Arguments `node` - Fully qualified path to specific sysfs node `key` - Name of
crates/disks/src/sysfs.rs:24
↓ 5 callers
Method
device
Returns the path to the block device in /dev.
crates/disks/src/lib.rs:136
↓ 4 callers
Function
kdl_value_to_storage_size
Convert a KDL value to a storage size
crates/types/src/kdl_helpers.rs:104
↓ 3 callers
Method
apply
Apply this strategy to a planner This will plan the necessary partition changes to fulfill the requirements Returns an error if the strategy cannot be
crates/partitioning/src/strategy.rs:148
↓ 3 callers
Function
create_test_disk
()
crates/partitioning/src/strategy.rs:340
↓ 3 callers
Method
device_path
Returns the path to the disk device in dev.
crates/disks/src/disk.rs:106
↓ 3 callers
Method
disk
Returns the disk device if the loop device is backed by a disk.
crates/disks/src/loopback.rs:82
↓ 3 callers
Method
fat32
(&self)
crates/superblock/src/fat.rs:153
↓ 3 callers
Function
get_kdl_property
Get a property from a node
crates/types/src/kdl_helpers.rs:60
↓ 3 callers
Method
plan_add_partition_with_attributes
Plan to add a new partition between two absolute positions on disk. # Arguments `start` - The absolute starting position in bytes from the beginning
crates/partitioning/src/planner.rs:286
↓ 2 callers
Method
add_strategy
Add a strategy configuration
crates/provisioning/src/provisioner.rs:63
↓ 2 callers
Method
apply_changes
Apply the changes to disk by: - Creating or opening the GPT table - Applying each change in sequence
crates/partitioning/src/writer.rs:138
↓ 2 callers
Function
boot_partition
Creates a /boot partition request
crates/partitioning/src/strategy.rs:315
↓ 2 callers
Method
changes
Get the list of pending changes
crates/partitioning/src/planner.rs:411
↓ 2 callers
Function
create
Creates a sparse file at the specified path with the given size. # Arguments `path` - Path where the sparse file should be created `size` - Size in b
crates/partitioning/src/sparsefile.rs:16
↓ 2 callers
Function
create_kernel_partitions
Creates kernel partitions based on the current GPT table # Arguments `path` - Path to the block device # Returns `Result<(), Error>` indicating succ
crates/partitioning/src/blkpg.rs:166
↓ 2 callers
Method
fat16
(&self)
crates/superblock/src/fat.rs:148
↓ 2 callers
Method
fat_type
(&self)
crates/superblock/src/fat.rs:123
↓ 2 callers
Method
find_free_regions
Find available free regions on the disk
crates/partitioning/src/strategy.rs:92
↓ 2 callers
Method
has_changes
Check if there are any pending changes
crates/partitioning/src/planner.rs:407
↓ 2 callers
Function
is_aligned
Check if a value is already aligned to the given boundary
crates/disks/src/sizing.rs:53
↓ 2 callers
Function
kdl_value_to_integer
Get an integer property from a value
crates/types/src/kdl_helpers.rs:94
↓ 2 callers
Method
offsets
Get the usable disk region offsets
crates/partitioning/src/planner.rs:421
↓ 2 callers
Method
plan
Attempt all strategies on the pool of devices
crates/provisioning/src/provisioner.rs:88
↓ 2 callers
Method
push_device
Add a device to the provisioner pool
crates/provisioning/src/provisioner.rs:69
↓ 2 callers
Function
remove_kernel_partitions
Removes all kernel partitions for the specified block device # Arguments `path` - Path to the block device # Returns `Result<(), Error>` indicating
crates/partitioning/src/blkpg.rs:137
↓ 2 callers
Function
swap_partition
Creates a swap partition request that scales with system RAM
crates/partitioning/src/strategy.rs:323
↓ 2 callers
Method
undo
Undo the most recent change
crates/partitioning/src/planner.rs:390
↓ 2 callers
Method
usable_size
Get the size of the usable disk region in bytes
crates/partitioning/src/planner.rs:416
↓ 2 callers
Method
validate_changes
Validate all planned changes before applying them by checking: - Device size matches the planned size - No duplicate partition IDs exist
crates/partitioning/src/writer.rs:116
↓ 2 callers
Function
vol_id
(vol_id: U32<LittleEndian>)
crates/superblock/src/fat.rs:170
↓ 2 callers
Function
vol_label
(vol_label: &[u8; 11])
crates/superblock/src/fat.rs:166
↓ 2 callers
Function
zero_region
Zero out a specific region of the disk
crates/partitioning/src/writer.rs:54
↓ 1 callers
Function
add_partition
Adds a new partition to the specified block device # Arguments `fd` - File descriptor for the block device `partition_number` - Number to assign to t
crates/partitioning/src/blkpg.rs:62
↓ 1 callers
Function
align_down
Align down to the nearest multiple of alignment, unless already aligned
crates/disks/src/sizing.rs:67
↓ 1 callers
Function
align_up
Align up to the nearest multiple of alignment, unless already aligned
crates/disks/src/sizing.rs:58
↓ 1 callers
Method
allocate_partition_id
Get the next available partition ID and increment the counter
crates/partitioning/src/planner.rs:440
↓ 1 callers
Function
apply_partitioning
Applies partitioning strategies to a block device # Arguments `whence` - Path to the block device to partition # Returns `Result<()>` - Success or e
crates/disktester/src/main.rs:31
↓ 1 callers
Method
as_gpt
Returns a reference to the GPT attributes if this is a GPT partition # Returns - `Some(&GptAttributes)` if this is a GPT partition - `None` if this i
crates/partitioning/src/attributes.rs:44
↓ 1 callers
Method
as_guid
Returns the GUID value for this partition type
crates/types/src/partition_type.rs:96
↓ 1 callers
Method
attach
Attaches a backing file to this loop device, allowing the file to be accessed as a block device. # Arguments `backing_file` - Path to the file to att
crates/partitioning/src/loopback.rs:57
↓ 1 callers
Method
attributes
(&self)
crates/provisioning/src/commands/create_partition.rs:36
↓ 1 callers
Function
capped_root_partition
Creates a root partition request capped at 100GB, suitable for layouts with home partition
crates/partitioning/src/strategy.rs:296
↓ 1 callers
Function
command
(name: &str)
crates/provisioning/src/commands.rs:23
↓ 1 callers
Method
create
Creates a new loop device by obtaining the next available device number from /dev/loop-control and opening the corresponding device file. # Returns `
crates/partitioning/src/loopback.rs:28
↓ 1 callers
Method
create_plans_for_strategy
( &'b self, strategy: &'b StrategyDefinition, device_assignments: &mut HashMap<String,
crates/provisioning/src/provisioner.rs:99
↓ 1 callers
Function
create_windows_disk
Creates a mock disk with an existing Windows installation Layout: - EFI System Partition (ESP): 100MB - Microsoft Reserved: 16MB - Windows C: Drive: 2
crates/partitioning/src/planner.rs:472
↓ 1 callers
Function
delete_partition
Deletes a partition from the specified block device # Arguments `fd` - File descriptor for the block device `partition_number` - Number of the partit
crates/partitioning/src/blkpg.rs:100
↓ 1 callers
Method
deref
Let disks deref to BasicDisk to eliminate code duplication
crates/disks/src/disk.rs:34
↓ 1 callers
Method
detach
Detaches the current backing file from this loop device. # Returns `io::Result<()>` indicating success or failure
crates/partitioning/src/loopback.rs:86
↓ 1 callers
Function
efi_partition
Creates a standard EFI system partition request
crates/partitioning/src/strategy.rs:307
↓ 1 callers
Method
file_path
Returns the backing file path.
crates/disks/src/loopback.rs:77
↓ 1 callers
Function
first_n_bytes
(arr: &[u8; M])
crates/superblock/src/fat.rs:158
↓ 1 callers
Method
force
Forces the format operation
crates/partitioning/src/formatter.rs:118
↓ 1 callers
Method
force_arg
(&self)
crates/partitioning/src/formatter.rs:89
↓ 1 callers
Method
format
Returns a Command configured to format the given device with the filesystem
crates/partitioning/src/formatter.rs:123
↓ 1 callers
Method
get_original_partition_id
Get the original partition ID for a given index
crates/partitioning/src/planner.rs:447
↓ 1 callers
Function
home_partition
Creates a home partition request that uses all remaining space
crates/partitioning/src/strategy.rs:334
↓ 1 callers
Method
label_arg
(&self)
crates/partitioning/src/formatter.rs:63
↓ 1 callers
Function
load_provisioning
Loads provisioning strategies from a configuration file # Arguments `path` - Path to the provisioning configuration file # Returns `Result<Vec<Strat
crates/disktester/src/main.rs:18
↓ 1 callers
Method
mkfs_command
(&self)
crates/partitioning/src/formatter.rs:25
↓ 1 callers
Method
model
Returns the model name of the disk.
crates/disks/src/disk.rs:121
↓ 1 callers
Method
overlaps_with
Check if this region overlaps with another
crates/partitioning/src/planner.rs:124
↓ 1 callers
Function
parse_command
Parse a command from a node if possible
crates/provisioning/src/commands.rs:33
↓ 1 callers
Method
partition_path
Returns the path to the partition with the given index. No attempt is made to verify the existence of the partition.
crates/disks/src/lib.rs:69
↓ 1 callers
Method
partitions_mut
Helper for MockDisk to modify partitions
crates/disks/src/disk.rs:101
↓ 1 callers
Method
plan_initialize_disk
Plan to initialize a clean partition layout
crates/partitioning/src/planner.rs:426
↓ 1 callers
Method
read_config
Read and parse the JSON configuration areas from the LUKS2 header # Arguments `reader` - Any type implementing Read trait to read the JSON data # R
crates/superblock/src/luks2/superblock.rs:132
↓ 1 callers
Function
root_partition
Creates a root partition request that uses remaining space with a minimum size
crates/partitioning/src/strategy.rs:288
↓ 1 callers
Method
sectors
Returns the total number of sectors on the disk.
crates/disks/src/disk.rs:111
↓ 1 callers
Method
sectors
Returns the total number of sectors on the block device.
crates/disks/src/lib.rs:47
↓ 1 callers
Method
simulate
Simulate changes without writing to disk
crates/partitioning/src/writer.rs:90
↓ 1 callers
Method
size
Returns the size of the disk in bytes.
crates/disks/src/disk.rs:116
↓ 1 callers
Method
strategy_parents
Build an inheritance chain for a strategy
crates/provisioning/src/provisioner.rs:75
↓ 1 callers
Function
sync_gpt_partitions
Updates kernel partition representations to match the GPT table # Arguments `path` - Path to the block device # Returns `Result<(), Error>` indicati
crates/partitioning/src/blkpg.rs:199
↓ 1 callers
Method
uuid_arg
(&self)
crates/partitioning/src/formatter.rs:37
↓ 1 callers
Method
vendor
Returns the vendor name of the disk.
crates/disks/src/disk.rs:126
↓ 1 callers
Method
wipe_disk
(&self)
crates/partitioning/src/planner.rs:436
↓ 1 callers
Method
with_end_offset
Set the usable disk region offsets
crates/partitioning/src/planner.rs:205
↓ 1 callers
Method
with_start_offset
Set the usable disk region offsets
crates/partitioning/src/planner.rs:197
↓ 1 callers
Function
zero_disk_headers
Zero out disk headers by wiping first 2MiB of the disk
crates/partitioning/src/writer.rs:71
↓ 1 callers
Function
zero_partition_prefix
Zero out up to 2MiB of a partition by writing 32 * 64KiB blocks Zero out up to 2MiB of a region by writing 32 * 64KiB blocks
crates/partitioning/src/writer.rs:78
Method
as_path
(&self)
crates/types/src/partition_role.rs:34
Method
default
()
crates/provisioning/src/provisioner.rs:47
Method
default
()
crates/partitioning/src/attributes.rs:21
Method
deref
(&self)
crates/disks/src/mock.rs:26
Method
deref
(&self)
crates/disks/src/mmc.rs:24
Method
deref
(&self)
crates/disks/src/nvme.rs:24
Method
deref
(&self)
crates/disks/src/scsi.rs:24
next →
1–100 of 213, ranked by callers