Skip to main content

CigarViewMut

Struct CigarViewMut 

Source
pub struct CigarViewMut<'a>(/* private fields */);
Expand description

A mutable view of a Cigar string.

See Views for more details. This struct is still in development; it currently only supports parsing and displaying, and not all the other operations that Cigar supports.

Implementations§

Source§

impl<'a> CigarViewMut<'a>

Source

pub fn as_bytes(&self) -> &[u8]

Retrieves the underlying byte string from the CIGAR string.

Source

pub fn from_slice_unchecked(v: &'a mut [u8]) -> Self

Creates a new CigarViewMut from v without checking for validity.

Source

pub fn iter(&self) -> CigletIterator<'_>

Returns an iterator of the contained Ciglet values.

Trait Implementations§

Source§

impl AsView for CigarViewMut<'_>

Source§

fn as_view(&self) -> CigarView<'_>

Creates an immutable view of the data.
Source§

impl AssocOwnedType for CigarViewMut<'_>

Source§

type Owned = Cigar

The owned data type associated with Self.
Source§

impl AssocViewMutType for CigarViewMut<'_>

Source§

type ViewMut<'a> = CigarViewMut<'a>

The mutable view data type associated with Self.
Source§

impl AssocViewType for CigarViewMut<'_>

Source§

type View<'a> = CigarView<'a>

The view data type associated with Self.
Source§

impl<'a> DataViewMut<'a> for CigarViewMut<'a>

Source§

fn reborrow_view_mut<'b>(&'b mut self) -> CigarViewMut<'b>
where 'a: 'b,

Reborrows the mutable view, reducing the lifetime to 'b.
Source§

impl Debug for CigarViewMut<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CigarViewMut<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Eq for CigarViewMut<'a>

Source§

impl<'a> Hash for CigarViewMut<'a>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a> IntoIterator for &'a CigarViewMut<'a>

Source§

type Item = Ciglet

The type of the elements being iterated over.
Source§

type IntoIter = CigletIterator<'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl Len for CigarViewMut<'_>

Source§

fn is_empty(&self) -> bool

Return whether the data type is empty or not.
Source§

fn len(&self) -> usize

Get the length of the data.
Source§

impl<'a> PartialEq for CigarViewMut<'a>

Source§

fn eq(&self, other: &CigarViewMut<'a>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for CigarViewMut<'a>

Source§

impl ToCigletIterator for &CigarViewMut<'_>

Source§

type Iter<'a> = CigletIterator<'a> where Self: 'a

The type of the iterator, which must yield Ciglet items.
Source§

fn to_ciglet_iterator(&self) -> CigletIterator<'_>

Creates an iterator over the Ciglet values.
Source§

impl ToOwnedData for CigarViewMut<'_>

Source§

fn to_owned_data(&self) -> Cigar

Creates an owned copy of the data via cloning.
Source§

impl<'a> ToView<'a> for CigarViewMut<'a>

Source§

fn to_view(self) -> CigarView<'a>

Creates an immutable view by consuming the mutable one.
Source§

impl<'a, const N: usize> TryFrom<&'a mut [u8; N]> for CigarViewMut<'a>

Source§

type Error = CigarError

The type returned in the event of a conversion error.
Source§

fn try_from(bytes: &'a mut [u8; N]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut [u8]> for CigarViewMut<'a>

Source§

type Error = CigarError

The type returned in the event of a conversion error.
Source§

fn try_from(bytes: &'a mut [u8]) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for CigarViewMut<'a>

§

impl<'a> Freeze for CigarViewMut<'a>

§

impl<'a> RefUnwindSafe for CigarViewMut<'a>

§

impl<'a> Send for CigarViewMut<'a>

§

impl<'a> Sync for CigarViewMut<'a>

§

impl<'a> Unpin for CigarViewMut<'a>

§

impl<'a> UnsafeUnpin for CigarViewMut<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.