[−][src]Struct glsp_engine::Str
The str
primitive type.
Most of this type's methods belong to the deque
abstract type, so they can be found in the
traits DequeOps
, DequeAccess
, and
DequeAccessRange
.
New strings can be constructed using the str!
macro or various toplevel
functions, such as glsp::str
and glsp::str_from_iter
.
Strings are always stored on the garbage-collected heap, so they're normally represented by
the type Root<Str>
.
Implementations
impl Str
[src]
pub fn shallow_clone(&self) -> Root<Str>ⓘ
[src]
Creates a new string with a copy of this string's contents.
Equivalent to (clone st)
.
pub fn access_giter(st: &Root<Str>, giter: &Root<GIter>) -> Root<GIter>ⓘ
[src]
Creates an indexing iterator for this collection.
Equivalent to [st iter]
.
pub fn push_rust_str(&self, s: &str) -> GResult<()>
[src]
Pushes all of the characters from a &str
to the end of this string.
Trait Implementations
impl Debug for Str
[src]
impl<I: DequeIndex> DequeAccess<I> for Str
[src]
pub fn get<R: FromElement<char>>(&self, index: I) -> GResult<R>
[src]
pub fn set<C: IntoElement<char>>(&self, index: I, ch: C) -> GResult<()>
[src]
pub fn insert<C: IntoElement<char>>(&self, index: I, ch: C) -> GResult<()>
[src]
pub fn del(&self, index: I) -> GResult<()>
[src]
pub fn remove<R: FromElement<char>>(&self, index: I) -> GResult<R>
[src]
pub fn swap_remove<R: FromElement<char>>(&self, index: I) -> GResult<R>
[src]
pub fn swap_remove_start<R: FromElement<char>>(&self, index: I) -> GResult<R>
[src]
impl<I: DequeIndex, R: DequeRange<I> + Debug> DequeAccessRange<I, R> for Str
[src]
impl DequeOps for Str
[src]
type Element = char
type Item = char
pub fn freeze(&self)
[src]
pub fn deep_freeze(&self)
[src]
pub fn is_frozen(&self) -> bool
[src]
pub fn is_deep_frozen(&self) -> bool
[src]
pub fn can_mutate(&self) -> bool
[src]
pub fn sort(&self) -> GResult<()>
[src]
pub fn sort_by<F>(&self, f: F) -> GResult<()> where
F: FnMut(&char, &char) -> GResult<Ordering>,
[src]
F: FnMut(&char, &char) -> GResult<Ordering>,
pub fn push<C: IntoElement<char>>(&self, ch: C) -> GResult<()>
[src]
pub fn pop<R: FromElement<char>>(&self) -> GResult<R>
[src]
pub fn push_start<C: IntoElement<char>>(&self, ch: C) -> GResult<()>
[src]
pub fn pop_start<R: FromElement<char>>(&self) -> GResult<R>
[src]
pub fn grow<C: IntoElement<char>>(
&self,
start_to_add: usize,
end_to_add: usize,
fill: C
) -> GResult<()>
[src]
&self,
start_to_add: usize,
end_to_add: usize,
fill: C
) -> GResult<()>
pub fn shrink(
&self,
start_to_remove: usize,
end_to_remove: usize
) -> GResult<()>
[src]
&self,
start_to_remove: usize,
end_to_remove: usize
) -> GResult<()>
pub fn append(&self, other: &Str) -> GResult<()>
[src]
pub fn prepend(&self, other: &Str) -> GResult<()>
[src]
pub fn resize<C: IntoElement<char>>(&self, new_len: usize, ch: C) -> GResult<()>
[src]
pub fn rotate_left(&self, mid: usize) -> GResult<()>
[src]
pub fn rotate_right(&self, k: usize) -> GResult<()>
[src]
pub fn swap<I1, I2>(&self, i_index: I1, j_index: I2) -> GResult<()> where
I1: DequeIndex,
I2: DequeIndex,
[src]
I1: DequeIndex,
I2: DequeIndex,
pub fn capacity(&self) -> usize
[src]
pub fn len(&self) -> usize
[src]
pub fn reserve_exact(&self, additional: usize) -> GResult<()>
[src]
pub fn reserve(&self, additional: usize) -> GResult<()>
[src]
pub fn shrink_to_fit(&self) -> GResult<()>
[src]
pub fn truncate(&self, len: usize) -> GResult<()>
[src]
pub fn clear(&self) -> GResult<()>
[src]
pub fn contains<C: IntoElement<char>>(&self, ch: C) -> GResult<bool>
[src]
pub fn extend<I, C>(&self, source: I) -> GResult<()> where
I: IntoIterator<Item = C>,
C: IntoElement<char>,
[src]
I: IntoIterator<Item = C>,
C: IntoElement<char>,
pub fn is_empty(&self) -> bool
[src]
pub fn iter<'a>(&'a self) -> IterDeque<'a, Self>ⓘ where
Self: DequeAccess<usize>,
[src]
Self: DequeAccess<usize>,
pub fn iter_to<'a, R: FromElement<Self::Element>>(
&'a self
) -> IterDequeTo<'a, Self, R>ⓘNotable traits for IterDequeTo<'a, T, R>
impl<'a, T: DequeAccess<usize>, R: FromElement<T::Element>> Iterator for IterDequeTo<'a, T, R> type Item = GResult<R>;
where
Self: DequeAccess<usize>,
[src]
&'a self
) -> IterDequeTo<'a, Self, R>ⓘ
Notable traits for IterDequeTo<'a, T, R>
impl<'a, T: DequeAccess<usize>, R: FromElement<T::Element>> Iterator for IterDequeTo<'a, T, R> type Item = GResult<R>;
Self: DequeAccess<usize>,
impl Display for Str
[src]
impl Eq for Str
[src]
impl Hash for Str
[src]
pub fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> IntoIterator for &'a Str
[src]
type Item = char
The type of the elements being iterated over.
type IntoIter = IterDeque<'a, Str>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> IterDeque<'a, Str>ⓘ
[src]
impl Ord for Str
[src]
pub fn cmp(&self, other: &Str) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Str> for Str
[src]
pub fn eq(&self, other: &Str) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Str> for Str
[src]
pub fn partial_cmp(&self, other: &Str) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Splay for Str
[src]
impl<'a> ToSym for Str
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Str
[src]
impl Send for Str
[src]
impl !Sync for Str
[src]
impl Unpin for Str
[src]
impl UnwindSafe for Str
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,