pub enum StringTree<S = Rc<str>>where
S: StringLeaf,{
Empty,
Leaf(S),
Node(Rc<StringNode<S>>),
}Variants§
Implementations§
Source§impl<S> StringTree<S>where
S: StringLeaf,
impl<S> StringTree<S>where
S: StringLeaf,
pub fn empty() -> Self
pub fn from_str(value: &str) -> Self
pub fn len(&self) -> usize
pub fn len_bytes(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn concat(left: Self, right: Self) -> Self
pub fn index(&self, index: usize) -> Option<char>
pub fn index_range(&self, start: usize, end: usize) -> Option<Self>
pub fn splice(&self, start: usize, end: usize, insert: Self) -> Option<Self>
pub fn to_flat_string(&self) -> String
pub fn view(&self) -> StringView<S>
pub fn black_height(&self) -> usize
pub fn is_red_black_well_formed(&self) -> bool
Trait Implementations§
Source§impl<S> Clone for StringTree<S>where
S: StringLeaf,
impl<S> Clone for StringTree<S>where
S: StringLeaf,
Source§impl<S> Debug for StringTree<S>where
S: StringLeaf + Debug,
impl<S> Debug for StringTree<S>where
S: StringLeaf + Debug,
Source§impl<S> From<&str> for StringTree<S>where
S: StringLeaf,
impl<S> From<&str> for StringTree<S>where
S: StringLeaf,
Source§impl<S> From<String> for StringTree<S>where
S: StringLeaf,
impl<S> From<String> for StringTree<S>where
S: StringLeaf,
Source§impl<S> PartialEq for StringTree<S>where
S: StringLeaf + PartialEq,
impl<S> PartialEq for StringTree<S>where
S: StringLeaf + PartialEq,
Source§fn eq(&self, other: &StringTree<S>) -> bool
fn eq(&self, other: &StringTree<S>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<S> Eq for StringTree<S>where
S: StringLeaf + Eq,
impl<S> StructuralPartialEq for StringTree<S>where
S: StringLeaf,
Auto Trait Implementations§
impl<S> Freeze for StringTree<S>where
S: Freeze,
impl<S> RefUnwindSafe for StringTree<S>where
S: RefUnwindSafe,
impl<S = Rc<str>> !Send for StringTree<S>
impl<S = Rc<str>> !Sync for StringTree<S>
impl<S> Unpin for StringTree<S>where
S: Unpin,
impl<S> UnsafeUnpin for StringTree<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for StringTree<S>where
S: UnwindSafe + RefUnwindSafe,
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