pub struct NostrParser;Expand description
Stateless factory that turns a &str into a NostrParserIter.
The parser holds no state itself; it exists so callers can configure module-wide defaults (currently none) without rebuilding the iterator at every call site.
Implementations§
Source§impl NostrParser
impl NostrParser
Sourcepub const fn parse(
self,
text: &str,
opts: NostrParserOptions,
) -> NostrParserIter<'_> ⓘ
pub const fn parse( self, text: &str, opts: NostrParserOptions, ) -> NostrParserIter<'_> ⓘ
Parse text into a token stream using opts.
The returned iterator borrows from text and lives for as
long as text does.
Trait Implementations§
Source§impl Clone for NostrParser
impl Clone for NostrParser
Source§fn clone(&self) -> NostrParser
fn clone(&self) -> NostrParser
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 NostrParser
Source§impl Debug for NostrParser
impl Debug for NostrParser
Source§impl Default for NostrParser
impl Default for NostrParser
Source§fn default() -> NostrParser
fn default() -> NostrParser
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NostrParser
impl RefUnwindSafe for NostrParser
impl Send for NostrParser
impl Sync for NostrParser
impl Unpin for NostrParser
impl UnsafeUnpin for NostrParser
impl UnwindSafe for NostrParser
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