pub struct Coordinate {
pub z: ZCoordinate,
pub y: YCoordinate,
pub x: XCoordinate,
}Expand description
@struct Coordinate
provides access to a default-initialized coordinate at 1.1.1/1.1.1/1.1.1
phext coordinates are formed along a 9-dimensional hierarchy with three main arms of the form z3.z2.z1/y3.y2.y1.x3.x2.x1 where:
§Z - this arm contains the library (z3), shelf (z2), and series (z1) dimensions Y - this arm contains the collection (y3), volume (y2), and book (y1) dimensions X - this arm contains the chapter (x3), section (x2), and scroll (x1) dimensions
Fields§
§z: ZCoordinate§y: YCoordinate§x: XCoordinateImplementations§
Source§impl Coordinate
impl Coordinate
pub fn new() -> Coordinate
Source§impl Coordinate
impl Coordinate
Sourcepub fn validate_coordinate(&self) -> bool
pub fn validate_coordinate(&self) -> bool
@fn validate_coordinate
determines if coord points to a valid phext address
§@param coord: the coordinate to reset
Sourcepub fn to_string(&self) -> String
pub fn to_string(&self) -> String
@fn to_string
produces a quoted string for the given phext address in canonical format (z3.z2.z1/y3.y2.y1/x3.x2.x1)
§@param coord the coordinate to translate
pub fn to_urlencoded(&self) -> String
Sourcepub fn scroll_break(&mut self)
pub fn scroll_break(&mut self)
§@fn scroll_break
Sourcepub fn section_break(&mut self)
pub fn section_break(&mut self)
§@fn section_break
Sourcepub fn chapter_break(&mut self)
pub fn chapter_break(&mut self)
§@fn chapter_break
Sourcepub fn book_break(&mut self)
pub fn book_break(&mut self)
§@fn book_break
Sourcepub fn volume_break(&mut self)
pub fn volume_break(&mut self)
§@fn volume_break
Sourcepub fn collection_break(&mut self)
pub fn collection_break(&mut self)
§@fn collection_break
Sourcepub fn series_break(&mut self)
pub fn series_break(&mut self)
§@fn series_break
Sourcepub fn shelf_break(&mut self)
pub fn shelf_break(&mut self)
§@fn shelf_break
Sourcepub fn library_break(&mut self)
pub fn library_break(&mut self)
§@fn library_break
Trait Implementations§
Source§impl Clone for Coordinate
impl Clone for Coordinate
Source§fn clone(&self) -> Coordinate
fn clone(&self) -> Coordinate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Coordinate
Source§impl Debug for Coordinate
impl Debug for Coordinate
Source§impl Default for Coordinate
impl Default for Coordinate
Source§fn default() -> Coordinate
fn default() -> Coordinate
Returns the “default value” for a type. Read more
Source§impl Display for Coordinate
impl Display for Coordinate
impl Eq for Coordinate
Source§impl Hash for Coordinate
impl Hash for Coordinate
Source§impl Ord for Coordinate
impl Ord for Coordinate
Source§fn cmp(&self, other: &Coordinate) -> Ordering
fn cmp(&self, other: &Coordinate) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Coordinate
impl PartialEq for Coordinate
Source§impl PartialOrd for Coordinate
impl PartialOrd for Coordinate
impl StructuralPartialEq for Coordinate
Auto Trait Implementations§
impl Freeze for Coordinate
impl RefUnwindSafe for Coordinate
impl Send for Coordinate
impl Sync for Coordinate
impl Unpin for Coordinate
impl UnsafeUnpin for Coordinate
impl UnwindSafe for Coordinate
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