pub struct CustomIdent {
pub v: *const [u8],
}Expand description
A CSS <custom-ident>.
Fields§
§v: *const [u8]Implementations§
Source§impl CustomIdent
impl CustomIdent
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)
Source§impl CustomIdent
impl CustomIdent
Trait Implementations§
Source§impl Clone for CustomIdent
impl Clone for CustomIdent
Source§fn clone(&self) -> CustomIdent
fn clone(&self) -> CustomIdent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CustomIdent
Source§impl Debug for CustomIdent
impl Debug for CustomIdent
Source§impl<'bump> DeepClone<'bump> for CustomIdent
impl<'bump> DeepClone<'bump> for CustomIdent
fn deep_clone(&self, bump: &'bump Arena) -> Self
Source§impl ParseWithOptions for CustomIdent
impl ParseWithOptions for CustomIdent
fn parse_with_options( input: &mut Parser<'_>, _options: &ParserOptions<'_>, ) -> CssResult<Self>
Auto Trait Implementations§
impl !Send for CustomIdent
impl !Sync for CustomIdent
impl Freeze for CustomIdent
impl RefUnwindSafe for CustomIdent
impl Unpin for CustomIdent
impl UnsafeUnpin for CustomIdent
impl UnwindSafe for CustomIdent
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