[−][src]Struct legion::world::Permissions
Describes read and write access to resources.
Implementations
impl<T: PartialEq> Permissions<T>
[src]
pub fn new() -> Self
[src]
Constructs a new empty permissions set.
pub fn push(&mut self, item: T)
[src]
Adds a resource to the permissions set as both readable and writable.
pub fn push_read(&mut self, item: T)
[src]
Adds a resource to the permissions set as readable.
pub fn push_write(&mut self, item: T)
[src]
Adds a resource to the permissions set as writable.
pub fn remove(&mut self, item: &T)
[src]
Removes a resource from the permissions set.
pub fn remove_read(&mut self, item: &T)
[src]
Removes read access to a resource from the permissions set.
pub fn remove_write(&mut self, item: &T)
[src]
Removes write access to a resource from the permissions set.
pub fn add(&mut self, other: Self)
[src]
Adds all of the permissions contained in the given set to this permission set.
pub fn subtract(&mut self, other: &Self)
[src]
Subtracts all of the permissions contained in the given set from this permission set.
pub fn reads(&self) -> &[T]
[src]
Gets a slice of resources which are afforded read access.
pub fn writes(&self) -> &[T]
[src]
Gets a slice of resources which are afforded write access.
pub fn reads_only(&self) -> &[T]
[src]
Gets a slice of resources which are afforded read access but not write access.
pub fn writes_only(&self) -> &[T]
[src]
Gets a slice of resources which are afforded write access but not read access.
pub fn readwrite(&self) -> &[T]
[src]
Gets a slice of resources which are afforded both read and write access.
pub fn is_superset(&self, other: &Self) -> bool
[src]
Returns true
if all of the permissions in the given set are contained in this set.
pub fn is_disjoint(&self, other: &Self) -> bool
[src]
Returns true
if none of the permissions in the given set are contained in this set.
Trait Implementations
impl<T: Clone + PartialEq> Clone for Permissions<T>
[src]
fn clone(&self) -> Permissions<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: PartialEq + Debug> Debug for Permissions<T>
[src]
impl<T: PartialEq> Default for Permissions<T>
[src]
impl<T: PartialEq + Display> Display for Permissions<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Permissions<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Permissions<T> where
T: Send,
T: Send,
impl<T> Sync for Permissions<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Permissions<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Permissions<T> where
T: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,