pub struct StrStack { /* private fields */ }Implementations§
Source§impl StrStack
impl StrStack
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_str(&self) -> &str
pub fn get(&self, index: usize) -> Option<&str>
Sourcepub unsafe fn get_unchecked(&self, begin: usize, end: usize) -> &str
👎Deprecated: Use get() instead. This will be removed in a future version.
pub unsafe fn get_unchecked(&self, begin: usize, end: usize) -> &str
Use get() instead. This will be removed in a future version.
Returns a &str slice without bounds checks.
§Safety
begin <= endend <= self.data.len()self.data[begin..end]must be valid UTF-8
pub fn get_bounds(&self, index: usize) -> Option<(usize, usize)>
pub fn get_top(&self) -> Option<&str>
pub fn remove_top(&mut self) -> Option<()>
pub fn pop_owned<T>(&mut self) -> Option<T>
pub fn push(&mut self, s: &str)
pub fn iter(&self) -> StrStackIter<'_> ⓘ
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StrStack
impl<'de> Deserialize<'de> for StrStack
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> IntoIterator for &'a StrStack
impl<'a> IntoIterator for &'a StrStack
impl Eq for StrStack
impl StructuralPartialEq for StrStack
Auto Trait Implementations§
impl Freeze for StrStack
impl RefUnwindSafe for StrStack
impl Send for StrStack
impl Sync for StrStack
impl Unpin for StrStack
impl UnsafeUnpin for StrStack
impl UnwindSafe for StrStack
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