Skip to main content

take_class

Function take_class 

Source
pub fn take_class(state: &mut State) -> Option<String>
Expand description

Takes the class of the current value from the state.

This is intended to be called by sinks from within Sink::atom or Sink::map. Returns None if the value is not an object (or an enum case or custom serialized object) or the data format is not PHP’s.

use deser::State;

fn class(state: &mut State) -> Option<String> {
    deser_php::take_class(state)
}