[−][src]Struct lark_string::Text
A "Text" is like a string except that it can be cheaply cloned.
You can also "extract" subtexts quite cheaply. You can also deref
an &Text
into a &str
for interoperability.
Used to represent the value of an input file.
Methods
impl Text
[src]
pub fn select(&mut self, range: Range<usize>)
[src]
Modifies this restrict to a subset of its current range.
pub fn extract(&self, range: Range<usize>) -> Self
[src]
Extract a new Text
that is a subset of an old Text
-- text.extract(1..3)
is similar to &foo[1..3]
except that
it gives back an owned value instead of a borrowed value.
Trait Implementations
impl Eq for Text
[src]
impl Clone for Text
[src]
fn clone(&self) -> Text
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Text> for Text
[src]
fn eq(&self, other: &Text) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<str> for Text
[src]
fn eq(&self, other: &str) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<String> for Text
[src]
fn eq(&self, other: &String) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Text> for str
[src]
fn eq(&self, other: &Text) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Text> for String
[src]
fn eq(&self, other: &Text) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T: ?Sized, '_> PartialEq<&'_ T> for Text where
Text: PartialEq<T>,
[src]
Text: PartialEq<T>,
fn eq(&self, other: &&T) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl AsRef<str> for Text
[src]
impl From<Arc<String>> for Text
[src]
impl From<String> for Text
[src]
impl<'_> From<&'_ String> for Text
[src]
impl<'_> From<&'_ str> for Text
[src]
impl Deref for Text
[src]
impl Hash for Text
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Text
[src]
impl Display for Text
[src]
impl Borrow<str> for Text
[src]
impl DebugWith for Text
[src]
fn fmt_with<Cx: ?Sized>(&self, cx: &Cx, fmt: &mut Formatter) -> Result
[src]
fn debug_with<Cx>(&'me self, cx: &'me Cx) -> DebugCxPair<'me, &'me Self, Cx> where
Cx: ?Sized,
[src]
Cx: ?Sized,
fn into_debug_with<Cx>(self, cx: &'me Cx) -> DebugCxPair<'me, Self, Cx> where
Cx: ?Sized,
[src]
Cx: ?Sized,
impl Intern<GlobalIdentifierTables> for Text
type Key = GlobalIdentifier
fn intern(self, tables: &dyn AsRef<GlobalIdentifierTables>) -> GlobalIdentifier
impl InternDirect<GlobalIdentifierTables> for Text
fn table(
tables: &dyn AsRef<GlobalIdentifierTables>
) -> &RwLock<InternTable<GlobalIdentifier, Text>>
tables: &dyn AsRef<GlobalIdentifierTables>
) -> &RwLock<InternTable<GlobalIdentifier, Text>>
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Cx, T> FmtWithSpecialized for T where
Cx: ?Sized,
T: Debug + ?Sized,
[src]
Cx: ?Sized,
T: Debug + ?Sized,
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,