[−][src]Struct position::Position
Source code position
Methods
impl Position
[src]
pub fn new(
module_path: &'static str,
file: &'static str,
line: u32,
column: u32
) -> Position
[src]
module_path: &'static str,
file: &'static str,
line: u32,
column: u32
) -> Position
Construct a new Position
pub fn file(self) -> &'static str
[src]
Get file as returned by file!()
pub fn module_path(self) -> &'static str
[src]
Get module path as returned by module_path!()
pub fn line(self) -> u32
[src]
Get line as returned by line!()
pub fn column(self) -> u32
[src]
Get column as returned by column!()
Trait Implementations
impl Clone for Position
[src]
fn clone(&self) -> Position
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Position> for Position
[src]
impl PartialOrd<Position> for Position
[src]
fn partial_cmp(&self, other: &Position) -> Option<Ordering>
[src]
fn lt(&self, other: &Position) -> bool
[src]
fn le(&self, other: &Position) -> bool
[src]
fn gt(&self, other: &Position) -> bool
[src]
fn ge(&self, other: &Position) -> bool
[src]
impl Ord for Position
[src]
fn cmp(&self, other: &Position) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
🔬 This is a nightly-only experimental API. (
clamp
)Returns max if self is greater than max, and min if self is less than min. Otherwise this will return self. Panics if min > max. Read more
impl Eq for Position
[src]
impl Copy for Position
[src]
impl Hash for Position
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Position
[src]
impl Display for Position
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,