Struct libparted::Alignment
[−]
[src]
pub struct Alignment<'a> { /* fields omitted */ }
Methods
impl<'a> Alignment<'a>
[src]
fn from_raw(alignment: *mut PedAlignment) -> Alignment<'a>
[src]
fn new(offset: i64, grain_size: i64) -> Result<Alignment<'a>>
[src]
Return an alignment object representing all sectors that are of the form
offset + X * grain_size
.
fn init(&mut self, offset: i64, grain_size: i64) -> Result<()>
[src]
Initializes a preallocated piece of memory for an alignment object.
The object will represent all sectors for which the equation
S = offset + x * grain_size
holds.
fn align_down(&self, geom: &Geometry, sector: i64) -> Option<u64>
[src]
Returns the sector that is closest to sector
, satifies the align
constraint, and lies
lies inside geom
.
fn align_nearest(&self, geom: &Geometry, sector: i64) -> Option<u64>
[src]
Returns the sector that is closest to sector
, satisfies the align
constraint, and
lies inside of geom
.
fn align_up(&self, geom: &Geometry, sector: i64) -> Option<u64>
[src]
Returns the sector that is closest to sector
, satifies the align
constraint, and lies
lies inside geom
.
fn duplicate<'b>(&self) -> Result<Alignment<'b>>
[src]
Clones and returns a duplicate of the alignment, if possible.
fn grain_size(&self) -> i64
[src]
fn intersect(&self, other: &Alignment) -> Option<Alignment<'a>>
[src]
Returns a new Alignment object if an intersection can between
itself and a given other
Alignment.
fn is_aligned(&self, geom: &Geometry, sector: i64) -> bool
[src]
Returns the sector that is closest to sector
, satifies the align
constraint, and lies
lies inside geom
.