IdDataType

Struct IdDataType 

Source
pub struct IdDataType<'a> {
    pub name: String,
    /* private fields */
}

Fields§

§name: String

Implementations§

Source§

impl<'a> IdDataType<'a>

Source

pub fn add_structure_converter( &mut self, version: impl Into<DataVersion>, func: impl MapDataConverterFunc + 'a, )

Source§

impl<'a> IdDataType<'a>

Source

pub fn add_structure_walker( &mut self, version: impl Into<DataVersion>, value: impl MapDataWalker + 'a, )

Source§

impl<'a> IdDataType<'a>

Source

pub fn add_structure_hook( &mut self, version: impl Into<DataVersion>, value: impl MapDataHook + 'a, )

Source§

impl<'a> IdDataType<'a>

Source

pub fn new(name: impl Into<String>) -> Self

Source

pub fn add_converter_for_id( &mut self, id: impl Into<JavaString>, version: impl Into<DataVersion>, converter_func: impl MapDataConverterFunc + 'a, )

Source

pub fn add_walker_for_id( &mut self, version: impl Into<DataVersion>, id: impl Into<JavaString>, walker: impl MapDataWalker + 'a, )

Source

pub fn copy_walkers( &mut self, version: impl Into<DataVersion> + Clone, from_id: impl AsRef<JavaStr>, to_id: impl Into<JavaString> + Clone, )

Trait Implementations§

Source§

impl<'a> AbstractMapDataType for IdDataType<'a>

Source§

fn convert( &self, data: &mut JCompound, from_version: DataVersion, to_version: DataVersion, )

Auto Trait Implementations§

§

impl<'a> Freeze for IdDataType<'a>

§

impl<'a> !RefUnwindSafe for IdDataType<'a>

§

impl<'a> !Send for IdDataType<'a>

§

impl<'a> !Sync for IdDataType<'a>

§

impl<'a> Unpin for IdDataType<'a>

§

impl<'a> !UnwindSafe for IdDataType<'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, 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.