Struct veloren_common_state::Areas
source · pub struct Areas {
areas: Depot<Aabb<i32>>,
area_names: HashMap<String, Id<Aabb<i32>>>,
}
Expand description
NOTE: Please don’t add Deserialize
without checking to make sure we
can guarantee the invariant that every entry in area_names
points to a
valid id in areas
.
Fields§
§areas: Depot<Aabb<i32>>
§area_names: HashMap<String, Id<Aabb<i32>>>
Implementations§
source§impl Areas
impl Areas
pub fn areas(&self) -> &Depot<Aabb<i32>>
pub fn area_metas(&self) -> &HashMap<String, Id<Aabb<i32>>>
sourcepub fn insert(
&mut self,
area_name: String,
area: Aabb<i32>
) -> Result<Id<Aabb<i32>>, String>
pub fn insert( &mut self, area_name: String, area: Aabb<i32> ) -> Result<Id<Aabb<i32>>, String>
If the area_name is already in the map, returns Err(area_name).
pub fn remove(&mut self, area_name: &str) -> Result<Aabb<i32>, SpecialAreaError>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Areas
impl Send for Areas
impl Sync for Areas
impl Unpin for Areas
impl UnwindSafe for Areas
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
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
source§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.