Struct cbm::Petscii [−][src]
pub struct Petscii(_);
Commodore's 8-bit computers used an unusual variant of ASCII commonly known as "PETSCII".
A PETSCII string can be represented by this Petscii
struct, and its functions help handle
PETSCII strings and perform lossy conversions between PETSCII and Unicode.
Methods
impl Petscii
[src]
impl Petscii
pub fn from_bytes(bytes: &[u8]) -> Petscii
[src]
pub fn from_bytes(bytes: &[u8]) -> Petscii
pub fn from_padded_bytes(bytes: &[u8], pad_byte: u8) -> Petscii
[src]
pub fn from_padded_bytes(bytes: &[u8], pad_byte: u8) -> Petscii
pub fn from_str(string: &str) -> Petscii
[src]
pub fn from_str(string: &str) -> Petscii
We only translate Unicode code points that happen to be present in our PETSCII mapping. This includes letters, numbers, punctuation, and a handful of block graphic code points.
pub fn as_bytes<'a>(&'a self) -> &'a [u8]
[src]
pub fn as_bytes<'a>(&'a self) -> &'a [u8]
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
pub fn to_string(&self) -> String
[src]
pub fn to_string(&self) -> String
pub fn write_bytes_with_padding(
&self,
bytes: &mut [u8],
pad_byte: u8
) -> Result<(), ()>
[src]
pub fn write_bytes_with_padding(
&self,
bytes: &mut [u8],
pad_byte: u8
) -> Result<(), ()>
Trait Implementations
impl Into<Petscii> for Id
[src]
impl Into<Petscii> for Id
impl From<Petscii> for Id
[src]
impl From<Petscii> for Id
impl Clone for Petscii
[src]
impl Clone for Petscii
fn clone(&self) -> Petscii
[src]
fn clone(&self) -> Petscii
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Petscii
[src]
impl PartialEq for Petscii
fn eq(&self, other: &Petscii) -> bool
[src]
fn eq(&self, other: &Petscii) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Petscii) -> bool
[src]
fn ne(&self, other: &Petscii) -> bool
This method tests for !=
.
impl Into<String> for Petscii
[src]
impl Into<String> for Petscii
impl From<String> for Petscii
[src]
impl From<String> for Petscii
impl<'a> From<&'a String> for Petscii
[src]
impl<'a> From<&'a String> for Petscii
impl<'a> From<&'a str> for Petscii
[src]
impl<'a> From<&'a str> for Petscii
impl AsRef<Petscii> for Petscii
[src]
impl AsRef<Petscii> for Petscii
impl AsRef<[u8]> for Petscii
[src]
impl AsRef<[u8]> for Petscii
impl Display for Petscii
[src]
impl Display for Petscii
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Debug for Petscii
[src]
impl Debug for Petscii
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Index<usize> for Petscii
[src]
impl Index<usize> for Petscii
type Output = u8
The returned type after indexing.
fn index(&self, index: usize) -> &u8
[src]
fn index(&self, index: usize) -> &u8
Performs the indexing (container[index]
) operation.
impl IntoIterator for Petscii
[src]
impl IntoIterator for Petscii
type Item = u8
The type of the elements being iterated over.
type IntoIter = IntoIter<u8>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<'a> IntoIterator for &'a Petscii
[src]
impl<'a> IntoIterator for &'a Petscii