[−][src]Struct nobility::bin_decode::NbtString
NBT stores strings in Java's modified version of CESU-8 called "Modified UTF-8". This type stores a reference to the raw data in the file, and NbtString::decode can be used to convert it to a string.
Implementations
impl<'a> NbtString<'a>
[src]
pub fn decode(&self) -> Result<Cow<'_, str>, Cesu8DecodingError>
[src]
Attempts to parse the string into UTF-8 using the cesu8 crate. An error will be returned if this fails, which should only happen if the data contained is invalid CESU-8.
pub fn as_bytes(&self) -> &[u8]
[src]
Trait Implementations
impl<'a> Clone for NbtString<'a>
[src]
impl<'a> Copy for NbtString<'a>
[src]
impl<'a> Debug for NbtString<'a>
[src]
impl<'a> Deref for NbtString<'a>
[src]
impl<'a> Eq for NbtString<'a>
[src]
impl<'a> Hash for NbtString<'a>
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> PartialEq<NbtString<'a>> for NbtString<'a>
[src]
pub fn eq(&self, other: &NbtString<'a>) -> bool
[src]
pub fn ne(&self, other: &NbtString<'a>) -> bool
[src]
impl<'a, T> PartialEq<T> for NbtString<'a> where
T: AsRef<str>,
[src]
T: AsRef<str>,
impl<'a> StructuralEq for NbtString<'a>
[src]
impl<'a> StructuralPartialEq for NbtString<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for NbtString<'a>
[src]
impl<'a> Send for NbtString<'a>
[src]
impl<'a> Sync for NbtString<'a>
[src]
impl<'a> Unpin for NbtString<'a>
[src]
impl<'a> UnwindSafe for NbtString<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,