pub struct State { /* private fields */ }
Implementations§
Source§impl State
impl State
pub fn new() -> Result<Self, Error>
pub fn add_definition( &mut self, def: Definition, path: DocumentPath, ) -> Result<(), Error>
pub fn add_attribute( &mut self, name: &str, builder: fn(state: &mut State, path: DocumentPath, ctx: &Context<'_>) -> Result<Box<dyn Attribute>, Error>, allowed_types: HashSet<AllowedType>, ) -> Result<&Self, Error>
pub fn add_unresolved_pointer(&mut self, target: String, source: String)
pub fn get_definition(&self, ptr: &str) -> Option<&Definition>
pub fn get_attribute_builder( &self, typ: Type, attr: &str, ) -> Option<fn(state: &mut State, path: DocumentPath, ctx: &Context<'_>) -> Result<Box<dyn Attribute>, Error>>
pub fn get_required_attributes(&self, typ: Type) -> Option<&HashSet<String>>
pub fn get_unresolved_pointer(&self) -> Option<(String, HashSet<String>)>
Auto Trait Implementations§
impl Freeze for State
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more