pub struct Location {
pub segment: usize,
pub command: usize,
}Fields§
§segment: usize§command: usizeImplementations§
Source§impl Location
impl Location
pub fn new(segment: usize, command: usize) -> Location
Sourcepub fn previous(self) -> Option<Self>
pub fn previous(self) -> Option<Self>
If this is not the first command in a segment, return a location pointing to the previous command.
Sourcepub fn same_segment(self, other: Location) -> bool
pub fn same_segment(self, other: Location) -> bool
Returns true if other location is in the same segment.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Location
impl<'de> Deserialize<'de> for Location
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Location
impl Ord for Location
Source§impl PartialOrd for Location
impl PartialOrd for Location
impl Copy for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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