pub enum InsertError {
OutOfBounds {
idx: usize,
len: usize,
},
NotCharBoundary {
idx: usize,
},
TooLong,
}Expand description
An error returned by insertion operations.
Variants§
OutOfBounds
The index is outside the string bounds.
NotCharBoundary
The index is not on a UTF-8 character boundary.
TooLong
The result would exceed the fixed capacity.
Trait Implementations§
Source§impl Clone for InsertError
impl Clone for InsertError
Source§fn clone(&self) -> InsertError
fn clone(&self) -> InsertError
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 InsertError
Source§impl Debug for InsertError
impl Debug for InsertError
Source§impl Display for InsertError
impl Display for InsertError
impl Eq for InsertError
Source§impl PartialEq for InsertError
impl PartialEq for InsertError
Source§fn eq(&self, other: &InsertError) -> bool
fn eq(&self, other: &InsertError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InsertError
Auto Trait Implementations§
impl Freeze for InsertError
impl RefUnwindSafe for InsertError
impl Send for InsertError
impl Sync for InsertError
impl Unpin for InsertError
impl UnsafeUnpin for InsertError
impl UnwindSafe for InsertError
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