pub struct Rope { /* private fields */ }
Expand description
An efficient structure for sharing bytes/strings between multiple sources.
Cloning a Rope is extremely cheap (Arc and usize), and sharing the contents of one Rope can be done by just cloning an Arc.
Ropes are immutable, in order to construct one see RopeBuilder.
Implementations§
Source§impl Rope
impl Rope
Sourcepub fn cell(self) -> Vc<Self>
pub fn cell(self) -> Vc<Self>
Places a value in a cell of the current task.
Cell is selected based on the value type and call order of cell
.
Sourcepub fn resolved_cell(self) -> ResolvedVc<Self>
pub fn resolved_cell(self) -> ResolvedVc<Self>
Places a value in a cell of the current task. Returns a
[ResolvedVc
][turbo_tasks::ResolvedVc].
Cell is selected based on the value type and call order of cell
.
Trait Implementations§
Source§impl AddAssign<&Rope> for RopeBuilder
impl AddAssign<&Rope> for RopeBuilder
Source§fn add_assign(&mut self, rhs: &Rope)
fn add_assign(&mut self, rhs: &Rope)
Performs the
+=
operation. Read moreSource§impl<'de> Deserialize<'de> for Rope
impl<'de> Deserialize<'de> for Rope
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes strings into a contiguous, immutable Rope.
Source§impl DeterministicHash for Rope
impl DeterministicHash for Rope
Source§fn deterministic_hash<H: DeterministicHasher>(&self, state: &mut H)
fn deterministic_hash<H: DeterministicHasher>(&self, state: &mut H)
Ropes with similar contents hash the same, regardless of their structure.
Source§impl Ord for Rope
impl Ord for Rope
Source§impl PartialOrd for Rope
impl PartialOrd for Rope
Source§impl TraceRawVcs for Rope
impl TraceRawVcs for Rope
fn trace_raw_vcs(&self, __context__: &mut TraceRawVcsContext)
fn get_raw_vcs(&self) -> Vec<RawVc>
Source§impl ValueDebugFormat for Rope
impl ValueDebugFormat for Rope
fn value_debug_format<'a>(&'a self, depth: usize) -> ValueDebugFormatString<'a>
impl Eq for Rope
impl NonLocalValue for Rope
impl OperationValue for Rope
impl Upcast<Box<dyn ValueDebug>> for Rope
Auto Trait Implementations§
impl Freeze for Rope
impl RefUnwindSafe for Rope
impl Send for Rope
impl Sync for Rope
impl Unpin for Rope
impl UnwindSafe for Rope
Blanket Implementations§
§impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more