[−][src]Enum nbt::Value
Values which can be represented in the Named Binary Tag format.
Variants
Byte(i8)
Short(i16)
Int(i32)
Long(i64)
Float(f32)
Double(f64)
String(String)
Implementations
impl Value
[src]
pub fn id(&self) -> u8
[src]
The type ID of this Value
, which is a single byte in the range
0x01
to 0x0b
.
pub fn tag_name(&self) -> &str
[src]
A string representation of this tag.
pub fn to_writer<W>(&self, dst: &mut W) -> Result<()> where
W: Write,
[src]
W: Write,
Writes the payload of this Value
to an io::Write
destination.
pub fn from_reader<R>(id: u8, src: &mut R) -> Result<Value> where
R: Read,
[src]
R: Read,
Reads the payload of an Value
with a given type ID from an
io::Read
source.
pub fn print(&self, f: &mut Formatter<'_>, offset: usize) -> Result
[src]
pub fn len_bytes(&self) -> usize
[src]
The number of bytes this value serializes to, before compression
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl<'de> Deserialize<'de> for Value
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Value
[src]
impl<'a> From<&'a [i32]> for Value
[src]
impl<'a> From<&'a [i64]> for Value
[src]
impl<'a> From<&'a [i8]> for Value
[src]
impl<'a> From<&'a str> for Value
[src]
impl From<String> for Value
[src]
impl From<Vec<i32>> for Value
[src]
impl From<Vec<i64>> for Value
[src]
impl From<Vec<i8>> for Value
[src]
impl From<f32> for Value
[src]
impl From<f64> for Value
[src]
impl From<i16> for Value
[src]
impl From<i32> for Value
[src]
impl From<i64> for Value
[src]
impl From<i8> for Value
[src]
impl PartialEq<Value> for Value
[src]
impl Serialize for Value
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,