pub struct SourceOffset(/* private fields */);Expand description
A byte offset into the original UTF-8 source buffer.
Implementations§
Source§impl SourceOffset
impl SourceOffset
Sourcepub fn try_from_usize(value: usize) -> Result<Self, DebugMetadataError>
pub fn try_from_usize(value: usize) -> Result<Self, DebugMetadataError>
Convert a host-sized byte offset to QuickJS’s bounded source offset.
Trait Implementations§
Source§impl Clone for SourceOffset
impl Clone for SourceOffset
impl Copy for SourceOffset
Source§impl Debug for SourceOffset
impl Debug for SourceOffset
impl Eq for SourceOffset
Source§impl Hash for SourceOffset
impl Hash for SourceOffset
Source§impl Ord for SourceOffset
impl Ord for SourceOffset
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 SourceOffset
impl PartialEq for SourceOffset
Source§impl PartialOrd for SourceOffset
impl PartialOrd for SourceOffset
impl StructuralPartialEq for SourceOffset
Auto Trait Implementations§
impl Freeze for SourceOffset
impl RefUnwindSafe for SourceOffset
impl Send for SourceOffset
impl Sync for SourceOffset
impl Unpin for SourceOffset
impl UnsafeUnpin for SourceOffset
impl UnwindSafe for SourceOffset
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