Trait oxyroot::Unmarshaler

source ·
pub trait Unmarshaler {
    // Required method
    fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>;

    // Provided method
    fn class_name() -> Option<Vec<String>>
       where Self: Sized { ... }
}
Expand description

Trait that permits reading a type from an ROOT file.

Examples of types that implement this:

  • Primitive integers, floats, etc
  • Owned byte containers (Vec<T>, HashMap<K,V>, HashSet )

Required Methods§

source

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

Provided Methods§

source

fn class_name() -> Option<Vec<String>>
where Self: Sized,

Returns the kind of the type as C++ typename. Used to check if the type is supported.

Implementations on Foreign Types§

source§

impl Unmarshaler for bool

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for f32

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for f64

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for i8

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for i16

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for i32

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for i64

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for u8

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for u16

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for u32

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for u64

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl Unmarshaler for String

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl<K, V> Unmarshaler for HashMap<K, V>
where V: UnmarshalerInto<Item = V>, K: UnmarshalerInto<Item = K> + Eq + Hash,

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

impl<T> Unmarshaler for Vec<T>
where T: UnmarshalerInto<Item = T>,

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl<T> Unmarshaler for HashSet<T>
where T: UnmarshalerInto<Item = T> + Eq + Hash,

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

source§

impl<T, const N: usize> Unmarshaler for [T; N]
where T: UnmarshalerInto<Item = T>,

source§

fn unmarshal(&mut self, r: &mut RBuffer<'_>) -> Result<(), Error>

source§

fn class_name() -> Option<Vec<String>>
where Self: Sized,

Implementors§