Struct pascal_string::PascalStr [] [src]

pub struct PascalStr { /* fields omitted */ }

A borrowed slice from a PascalString. Does not own its data.

Methods

impl PascalStr
[src]

[src]

Get a pointer to the first byte of the string buffer.

[src]

Get a mutable pointer to the first byte of the string buffer.

[src]

Get the PascalStr as an immutable &str reference.

[src]

Get this string as a CStr.

Returns Err(InteriorNullError) if the string contains any interior nulls. If this string is full, then a new CString will be allocated to hold the trailing null byte.

[src]

Returns the number of characters used in the string.

[src]

Returns true if the string has a length of 0

[src]

Returns true if the string has a length of 255.

When this value is true, no more elements can be pushed onto the string.

Important traits for Chars<'a>
[src]

Get an immutable iterator to the internal character array.

Important traits for CharsMut<'a>
[src]

Get a mutable iterator to the internal character array.

Important traits for Lines<'a>
[src]

Get an iterator over the lines of the internal character array.

[src]

Get a character in the string, without checking if the index is within the bounds of len().

This method cannot cause memory unsafety because index is bounds checked within the maximum possible length of the PascalStr, which means that it cannot read uninitialised memory. However, it can give access to stale characters if index is greater than or equal to self.len() or isize::MAX, and self.is_full() is false.

Panics

This method will panic if index is larger than u8::MAX(255).

Trait Implementations

impl Eq for PascalStr
[src]

impl Hash for PascalStr
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for PascalStr
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<S: AsRef<PascalStr> + ?Sized> PartialEq<S> for PascalStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<S: AsRef<PascalStr> + ?Sized> PartialOrd<S> for PascalStr
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl AsciiExt for PascalStr
[src]

Container type for copied ASCII characters.

[src]

Checks if the value is within the ASCII range. Read more

[src]

Makes a copy of the value in its ASCII upper case equivalent. Read more

[src]

Makes a copy of the value in its ASCII lower case equivalent. Read more

[src]

Checks that two values are an ASCII case-insensitive match. Read more

[src]

Converts this type to its ASCII upper case equivalent in-place. Read more

[src]

Converts this type to its ASCII lower case equivalent in-place. Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII alphabetic character: U+0041 'A' ... U+005A 'Z' or U+0061 'a' ... U+007A 'z'. For strings, true if all characters in the string are ASCII alphabetic. Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII uppercase character: U+0041 'A' ... U+005A 'Z'. For strings, true if all characters in the string are ASCII uppercase. Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII lowercase character: U+0061 'a' ... U+007A 'z'. For strings, true if all characters in the string are ASCII lowercase. Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII alphanumeric character: U+0041 'A' ... U+005A 'Z', U+0061 'a' ... U+007A 'z', or U+0030 '0' ... U+0039 '9'. For strings, true if all characters in the string are ASCII alphanumeric. Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII decimal digit: U+0030 '0' ... U+0039 '9'. For strings, true if all characters in the string are ASCII digits. Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII hexadecimal digit: U+0030 '0' ... U+0039 '9', U+0041 'A' ... U+0046 'F', or U+0061 'a' ... U+0066 'f'. For strings, true if all characters in the string are ASCII hex digits. Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII punctuation character: Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII graphic character: U+0021 '!' ... U+007E '~'. For strings, true if all characters in the string are ASCII graphic characters. Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII whitespace character: U+0020 SPACE, U+0009 HORIZONTAL TAB, U+000A LINE FEED, U+000C FORM FEED, or U+000D CARRIAGE RETURN. For strings, true if all characters in the string are ASCII whitespace. Read more

[src]

🔬 This is a nightly-only experimental API. (ascii_ctype)

Checks if the value is an ASCII control character: U+0000 NUL ... U+001F UNIT SEPARATOR, or U+007F DELETE. Note that most ASCII whitespace characters are control characters, but SPACE is not. Read more

impl Debug for PascalStr
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for PascalStr
[src]

[src]

Formats the value using the given formatter. Read more

impl ToOwned for PascalStr
[src]

[src]

Creates owned data from borrowed data, usually by cloning. Read more

[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl AsRef<PascalStr> for PascalStr
[src]

[src]

Performs the conversion.

impl AsRef<str> for PascalStr
[src]

[src]

Performs the conversion.

impl AsRef<[u8]> for PascalStr
[src]

[src]

Performs the conversion.

impl AsRef<AsciiStr> for PascalStr
[src]

[src]

Performs the conversion.

impl AsMut<AsciiStr> for PascalStr
[src]

[src]

Performs the conversion.

impl AsRef<[AsciiChar]> for PascalStr
[src]

[src]

Performs the conversion.

impl AsMut<[AsciiChar]> for PascalStr
[src]

[src]

Performs the conversion.

impl Index<u8> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<u8> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<usize> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<usize> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<i32> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<i32> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<RangeFull> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<RangeFull> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<Range<u8>> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<Range<u8>> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<Range<usize>> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<Range<usize>> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<Range<i32>> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<Range<i32>> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<RangeFrom<u8>> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<RangeFrom<u8>> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<RangeFrom<usize>> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<RangeFrom<usize>> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<RangeFrom<i32>> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<RangeFrom<i32>> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<RangeTo<u8>> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<RangeTo<u8>> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<RangeTo<usize>> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<RangeTo<usize>> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl Index<RangeTo<i32>> for PascalStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<RangeTo<i32>> for PascalStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl<'a> IntoIterator for &'a PascalStr
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'a> IntoIterator for &'a mut PascalStr
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl AsRef<PascalStr> for PascalString
[src]

[src]

Performs the conversion.

impl Borrow<PascalStr> for PascalString
[src]

[src]

Immutably borrows from an owned value. Read more

impl BorrowMut<PascalStr> for PascalString
[src]

[src]

Mutably borrows from an owned value. Read more

Auto Trait Implementations

impl Send for PascalStr

impl Sync for PascalStr