pub struct ParamBufOwned { /* private fields */ }Expand description
Owned parameters of an escape sequence, as stored on VTOwnedEvent.
This is the owned counterpart of ParamBuf. Unlike the parser’s
fixed-capacity inline storage (see ParamBuf), it is sized to its
contents on the heap, so an owned copy of a small parameter list is
small; the limits documented on ParamBuf apply as before. It is a
convenience type: like other to_owned() data, it is intended for use
outside the parsing hot path.
Holding no parameters is allocation-free.
Implementations§
Source§impl ParamBufOwned
impl ParamBufOwned
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, index: usize) -> Option<&[u8]>
pub fn try_parse<T: FromStr>(&self, index: usize) -> Option<T>
Sourcepub fn overflowed(&self) -> bool
pub fn overflowed(&self) -> bool
Whether any parameter bytes were dropped by the capacity limits; see
the ParamBuf documentation.
pub fn borrow(&self) -> ParamBuf<'_>
pub fn numeric(&self) -> NumericParamBuf<'_>
Trait Implementations§
Source§impl Clone for ParamBufOwned
impl Clone for ParamBufOwned
Source§impl Debug for ParamBufOwned
impl Debug for ParamBufOwned
Source§impl Default for ParamBufOwned
impl Default for ParamBufOwned
impl Eq for ParamBufOwned
Source§impl IntoIterator for ParamBufOwned
impl IntoIterator for ParamBufOwned
Source§impl<'b> IntoIterator for &'b ParamBufOwned
impl<'b> IntoIterator for &'b ParamBufOwned
Source§impl PartialEq for ParamBufOwned
impl PartialEq for ParamBufOwned
impl StructuralPartialEq for ParamBufOwned
Auto Trait Implementations§
impl Freeze for ParamBufOwned
impl RefUnwindSafe for ParamBufOwned
impl Send for ParamBufOwned
impl Sync for ParamBufOwned
impl Unpin for ParamBufOwned
impl UnsafeUnpin for ParamBufOwned
impl UnwindSafe for ParamBufOwned
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