pub enum ValueLocation {
ZeroLength,
Nonzero(NonzeroValueLocation),
}
Expand description
Location data for a value. Includes the case where the value is empty and so doesn’t require allocation.
Variants§
ZeroLength
Nonzero(NonzeroValueLocation)
Implementations§
Source§impl ValueLocation
impl ValueLocation
pub fn into_non_zero(self) -> Option<NonzeroValueLocation>
pub fn file_offset(&self) -> Option<u64>
pub fn file_id(&self) -> Option<&FileId>
pub fn length(&self) -> u64
Trait Implementations§
Source§impl Clone for ValueLocation
impl Clone for ValueLocation
Source§fn clone(&self) -> ValueLocation
fn clone(&self) -> ValueLocation
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ValueLocation
impl Debug for ValueLocation
Source§impl PartialEq for ValueLocation
impl PartialEq for ValueLocation
impl Copy for ValueLocation
impl StructuralPartialEq for ValueLocation
Auto Trait Implementations§
impl Freeze for ValueLocation
impl RefUnwindSafe for ValueLocation
impl Send for ValueLocation
impl Sync for ValueLocation
impl Unpin for ValueLocation
impl UnwindSafe for ValueLocation
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