pub struct Ident {
pub v: *const [u8],
}Expand description
A CSS <ident>.
Fields§
§v: *const [u8]Implementations§
Source§impl Ident
impl Ident
Sourcepub fn v(&self) -> &[u8] ⓘ
pub fn v(&self) -> &[u8] ⓘ
Borrow the underlying arena-owned slice.
v is always a non-null fat pointer into the parser’s bump arena
(constructed from expect_ident() source text or copied from
another instance). Arena bytes are immutable and outlive every
value produced from them, so handing out &[u8] is sound.
NOTE: the borrow is tied to &self. Call sites that must return
the slice with the 'static placeholder lifetime (e.g.
IdentOrRef::{debug_ident,as_str,as_original_string},
Printer::lookup_ident_or_ref, SelectorParser::namespace_for_prefix)
still go through the raw v field directly until 'bump is threaded.
pub fn deep_clone(&self, _bump: &Arena) -> Self
pub fn hash(&self, hasher: &mut Wyhash)
Trait Implementations§
impl Copy for Ident
Source§impl<'bump> DeepClone<'bump> for Ident
impl<'bump> DeepClone<'bump> for Ident
fn deep_clone(&self, bump: &'bump Arena) -> Self
Source§impl ParseWithOptions for Ident
impl ParseWithOptions for Ident
fn parse_with_options( input: &mut Parser<'_>, _options: &ParserOptions<'_>, ) -> CssResult<Self>
Auto Trait Implementations§
impl !Send for Ident
impl !Sync for Ident
impl Freeze for Ident
impl RefUnwindSafe for Ident
impl Unpin for Ident
impl UnsafeUnpin for Ident
impl UnwindSafe for Ident
Blanket Implementations§
Source§impl<T> AsCtxPtr for Twhere
T: ?Sized,
impl<T> AsCtxPtr for Twhere
T: ?Sized,
Source§fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
self’s address as *mut Self for deferred-task / scopeguard /
ref_guard ctx slots. The closures/trampolines deref it as shared
(&*p) — every method they reach is &self post-R-2, so no write
provenance is required; the *mut spelling is purely to match the
existing DerefOnDrop / HasAutoFlush / RefCount ABI.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