pub struct ViewerContext { /* private fields */ }Expand description
An observation identity authorized by the run’s persisted observation
policy. This type is intentionally constructed through
Canwu::viewer_context so an observation request cannot self-escalate.
Implementations§
Source§impl ViewerContext
impl ViewerContext
pub const fn actor(self) -> PersonId
pub const fn observation(self) -> ObservationPolicy
Trait Implementations§
Source§impl Clone for ViewerContext
impl Clone for ViewerContext
Source§fn clone(&self) -> ViewerContext
fn clone(&self) -> ViewerContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ViewerContext
Source§impl Debug for ViewerContext
impl Debug for ViewerContext
impl Eq for ViewerContext
Source§impl PartialEq for ViewerContext
impl PartialEq for ViewerContext
impl StructuralPartialEq for ViewerContext
Auto Trait Implementations§
impl Freeze for ViewerContext
impl RefUnwindSafe for ViewerContext
impl Send for ViewerContext
impl Sync for ViewerContext
impl Unpin for ViewerContext
impl UnsafeUnpin for ViewerContext
impl UnwindSafe for ViewerContext
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