pub struct ApprovalQueue { /* private fields */ }Expand description
FIFO queue for pending permission and question approvals.
Implementations§
Source§impl ApprovalQueue
impl ApprovalQueue
pub fn new() -> Self
Sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Returns true if there are pending items.
Sourcepub fn peek(&self) -> Option<&PendingApproval>
pub fn peek(&self) -> Option<&PendingApproval>
Returns a reference to the front item without removing it.
Sourcepub fn add_permission(&mut self, request: PermissionRequest)
pub fn add_permission(&mut self, request: PermissionRequest)
Adds a permission request to the back of the queue.
Sourcepub fn add_question(&mut self, request: QuestionRequest)
pub fn add_question(&mut self, request: QuestionRequest)
Adds a question request to the back of the queue.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApprovalQueue
impl RefUnwindSafe for ApprovalQueue
impl Send for ApprovalQueue
impl Sync for ApprovalQueue
impl Unpin for ApprovalQueue
impl UnsafeUnpin for ApprovalQueue
impl UnwindSafe for ApprovalQueue
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