pub struct InternedSlice {
pub base: InternedString,
pub start: u32,
pub end: u32,
}Expand description
An interned sub-slice: stores a base interned string plus a byte range.
Fields§
§base: InternedString§start: u32§end: u32Implementations§
Source§impl InternedSlice
impl InternedSlice
Sourcepub fn new(base: InternedString, start: u32, end: u32) -> Self
pub fn new(base: InternedString, start: u32, end: u32) -> Self
Create a new interned slice.
Sourcepub fn resolve<'a>(&self, pool: &'a StringPool) -> Option<&'a str>
pub fn resolve<'a>(&self, pool: &'a StringPool) -> Option<&'a str>
Resolve the slice against a pool.
Trait Implementations§
Source§impl Clone for InternedSlice
impl Clone for InternedSlice
Source§fn clone(&self) -> InternedSlice
fn clone(&self) -> InternedSlice
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InternedSlice
impl Debug for InternedSlice
Source§impl Hash for InternedSlice
impl Hash for InternedSlice
Source§impl PartialEq for InternedSlice
impl PartialEq for InternedSlice
impl Copy for InternedSlice
impl Eq for InternedSlice
impl StructuralPartialEq for InternedSlice
Auto Trait Implementations§
impl Freeze for InternedSlice
impl RefUnwindSafe for InternedSlice
impl Send for InternedSlice
impl Sync for InternedSlice
impl Unpin for InternedSlice
impl UnsafeUnpin for InternedSlice
impl UnwindSafe for InternedSlice
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