[−][src]Struct glsp::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
.
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) -> Result<(), GError>
[src]
Pushes all of the characters from a &str
to the end of this string.
Trait Implementations
impl Debug for Str
[src]
impl<I> DequeAccess<I> for Str where
I: DequeIndex,
[src]
I: DequeIndex,
fn get<R>(&self, index: I) -> Result<R, GError> where
R: FromElement<char>,
[src]
R: FromElement<char>,
fn set<C>(&self, index: I, ch: C) -> Result<(), GError> where
C: IntoElement<char>,
[src]
C: IntoElement<char>,
fn insert<C>(&self, index: I, ch: C) -> Result<(), GError> where
C: IntoElement<char>,
[src]
C: IntoElement<char>,
fn del(&self, index: I) -> Result<(), GError>
[src]
fn remove<R>(&self, index: I) -> Result<R, GError> where
R: FromElement<char>,
[src]
R: FromElement<char>,
fn swap_remove<R>(&self, index: I) -> Result<R, GError> where
R: FromElement<char>,
[src]
R: FromElement<char>,
fn swap_remove_start<R>(&self, index: I) -> Result<R, GError> where
R: FromElement<char>,
[src]
R: FromElement<char>,
impl<I, R> DequeAccessRange<I, R> for Str where
I: DequeIndex,
R: DequeRange<I> + Debug,
[src]
I: DequeIndex,
R: DequeRange<I> + Debug,
impl DequeOps for Str
[src]
type Element = char
type Item = char
fn freeze(&self)
[src]
fn deep_freeze(&self)
[src]
fn is_frozen(&self) -> bool
[src]
fn is_deep_frozen(&self) -> bool
[src]
fn can_mutate(&self) -> bool
[src]
fn push<C>(&self, ch: C) -> Result<(), GError> where
C: IntoElement<char>,
[src]
C: IntoElement<char>,
fn pop<R>(&self) -> Result<R, GError> where
R: FromElement<char>,
[src]
R: FromElement<char>,
fn push_start<C>(&self, ch: C) -> Result<(), GError> where
C: IntoElement<char>,
[src]
C: IntoElement<char>,
fn pop_start<R>(&self) -> Result<R, GError> where
R: FromElement<char>,
[src]
R: FromElement<char>,
fn grow<C>(
&self,
start_to_add: usize,
end_to_add: usize,
fill: C
) -> Result<(), GError> where
C: IntoElement<char>,
[src]
&self,
start_to_add: usize,
end_to_add: usize,
fill: C
) -> Result<(), GError> where
C: IntoElement<char>,
fn shrink(
&self,
start_to_remove: usize,
end_to_remove: usize
) -> Result<(), GError>
[src]
&self,
start_to_remove: usize,
end_to_remove: usize
) -> Result<(), GError>
fn append(&self, other: &Str) -> Result<(), GError>
[src]
fn prepend(&self, other: &Str) -> Result<(), GError>
[src]
fn resize<C>(&self, new_len: usize, ch: C) -> Result<(), GError> where
C: IntoElement<char>,
[src]
C: IntoElement<char>,
fn rotate_left(&self, mid: usize) -> Result<(), GError>
[src]
fn rotate_right(&self, k: usize) -> Result<(), GError>
[src]
fn swap<I1, I2>(&self, i_index: I1, j_index: I2) -> Result<(), GError> where
I1: DequeIndex,
I2: DequeIndex,
[src]
I1: DequeIndex,
I2: DequeIndex,
fn capacity(&self) -> usize
[src]
fn len(&self) -> usize
[src]
fn reserve_exact(&self, additional: usize) -> Result<(), GError>
[src]
fn reserve(&self, additional: usize) -> Result<(), GError>
[src]
fn shrink_to_fit(&self) -> Result<(), GError>
[src]
fn truncate(&self, len: usize) -> Result<(), GError>
[src]
fn clear(&self) -> Result<(), GError>
[src]
fn contains<C>(&self, ch: C) -> Result<bool, GError> where
C: IntoElement<char>,
[src]
C: IntoElement<char>,
fn extend<I, C>(&self, source: I) -> Result<(), GError> where
C: IntoElement<char>,
I: IntoIterator<Item = C>,
[src]
C: IntoElement<char>,
I: IntoIterator<Item = C>,
fn is_empty(&self) -> bool
[src]
fn iter(&'a self) -> IterDeque<'a, Self> where
Self: DequeAccess<usize>,
[src]
Self: DequeAccess<usize>,
fn iter_to<R>(&'a self) -> IterDequeTo<'a, Self, R> where
R: FromElement<Self::Element>,
Self: DequeAccess<usize>,
[src]
R: FromElement<Self::Element>,
Self: DequeAccess<usize>,
impl Display for Str
[src]
impl Hash for Str
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
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?
fn into_iter(self) -> IterDeque<'a, Str>
[src]
impl<'a, 'r> MakeArg<'a> for &'r Str where
'a: 'r,
[src]
'a: 'r,
impl PartialEq<Str> for Str
[src]
impl Serialize for Str
[src]
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl Splay for Str
[src]
impl<'a> ToSym for Str
[src]
Auto Trait Implementations
impl GSend for Str
impl GStore for Str
impl !RefUnwindSafe for Str
impl Send for Str
impl !Sync for Str
impl Unpin for Str
impl UnwindSafe for Str
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
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<'a, T> ToSym for T where
T: Deref,
<T as Deref>::Target: ToSym,
[src]
T: Deref,
<T as Deref>::Target: ToSym,
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.
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>,