[][src]Struct swim_mem::resident::String

pub struct String<M = ()> { /* fields omitted */ }

A resizeable array of Unicode code points, residing in a memory Lease. A String is a Resident typeclass; it doesn't store any data in its internal structure. Rather, String implements an access pattern for memory blocks managed by a Lease. A composing Lease type defines the memory allocation and ownership semantics of the composed String type.

Lease implementations commonly composed with a String include:

String implements LeaseDeref, and LeaseDerefMut, which enables deref coercions from Own<String>, Mut<String>, and Ref<String> to &StringLease<L>. StringLease in turn deref coerces to &str and &mut str. This makes leased strings "feel" like they contain a str, even though String is just a typeclass for accessing the str stored in the composing memory Lease. Most string operations are defined on StringLease; String can't do much on its own since it doesn't actually contain any data.

Trait Implementations

impl<M> Resident for String<M>[src]

type Data = u8

The type of pointed-to data stored in leased memory blocks. The size of leased memory blocks must be a positive multiple of the Data size. Read more

type Meta = BufHeader<M>

The type of metadata stored with leased memory blocks. Meta data must contain sufficient information to resolve the size of any resided-in memory Lease. Read more

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentFromCopy<L, str, M> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentFromEmpty<L, M> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentWithCapacity<L, M> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentDeref<L> for String<M>[src]

type Target = StringLease<L, M>

The type the resident dereferences to.

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentDerefMut<L> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentAsRef<L, str> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentAsRef<L, [u8]> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndex<L, Range<usize>> for String<M>[src]

type Output = str

The type of values indexed by the resident for the parameterized Idx type.

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndex<L, RangeFrom<usize>> for String<M>[src]

type Output = str

The type of values indexed by the resident for the parameterized Idx type.

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndex<L, RangeFull> for String<M>[src]

type Output = str

The type of values indexed by the resident for the parameterized Idx type.

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndex<L, RangeInclusive<usize>> for String<M>[src]

type Output = str

The type of values indexed by the resident for the parameterized Idx type.

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndex<L, RangeTo<usize>> for String<M>[src]

type Output = str

The type of values indexed by the resident for the parameterized Idx type.

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndex<L, RangeToInclusive<usize>> for String<M>[src]

type Output = str

The type of values indexed by the resident for the parameterized Idx type.

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndexMut<L, Range<usize>> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndexMut<L, RangeFrom<usize>> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndexMut<L, RangeFull> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndexMut<L, RangeInclusive<usize>> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndexMut<L, RangeTo<usize>> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentIndexMut<L, RangeToInclusive<usize>> for String<M>[src]

impl<'a, 'b, L: DynamicLease<'a, Data = u8, Meta = BufHeader<M>>, M> ResidentAdd<L, &'b str> for String<M>[src]

type Output = L

The resulting type of applying the + operator.

impl<'a, 'b, L: DynamicLease<'a, Data = u8, Meta = BufHeader<M>>, M> ResidentAddAssign<L, &'b str> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentPartialEq<L, L> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentEq<L> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentPartialOrd<L, L> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentOrd<L> for String<M>[src]

fn resident_lt(lease: &L, other: &L) -> bool[src]

fn resident_le(lease: &L, other: &L) -> bool[src]

fn resident_ge(lease: &L, other: &L) -> bool[src]

fn resident_gt(lease: &L, other: &L) -> bool[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentHash<L> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentDisplay<L> for String<M>[src]

impl<L: Lease<Data = u8, Meta = BufHeader<M>>, M> ResidentDebug<L> for String<M>[src]

impl<L1, L2, M> ResidentClone<L1, L2> for String<M> where
    L1: Lease<Data = u8, Meta = BufHeader<M>>,
    L2: Lease<Data = u8, Meta = BufHeader<M>>,
    M: TryClone
[src]

impl<'b, L1, L2, M> ResidentStow<'b, L1, L2> for String<M> where
    L1: Lease<Data = u8, Meta = BufHeader<M>>,
    L2: Lease<Data = u8, Meta = BufHeader<M>>,
    M: TryClone
[src]

impl<M: Sync> Sync for String<M>[src]

impl<M: Send> Send for String<M>[src]

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]