pub struct Resource { /* private fields */ }
Implementations§
Source§impl Resource
impl Resource
pub fn new<S: Into<String>>(name: S, position: Option<Position>) -> Self
pub fn states(&self) -> &Vec<State>
pub fn add_state(&mut self, state: State) -> StateId
pub fn get_state(&self, id: StateId) -> Option<&State>
pub fn initial(&self) -> StateId
pub fn set_initial(&mut self, state: Reference<StateId>)
pub fn state_map(&self) -> HashMap<String, StateId>
pub fn get_state_from_name(&self, name: &str) -> Option<&State>
pub fn transitions(&self) -> &Transitions
pub fn set_transitions(&mut self, transitions: Transitions)
pub fn transitions_list(&self) -> Vec<Transition>
pub fn names(&self) -> Vec<(String, Option<Position>)>
pub fn resolve_state(&mut self) -> Result<(), RlError>
Trait Implementations§
Source§impl Named<ResourceId> for Resource
impl Named<ResourceId> for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
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