pub struct ConsentStore { /* private fields */ }Expand description
Per-room opt-in, kept in the vault so it survives restarts and travels with the identity.
Implementations§
Source§impl ConsentStore
impl ConsentStore
pub fn new(vault: Arc<dyn KeyVault>) -> Self
Sourcepub fn grant(
&self,
bridge: &str,
room_id: &str,
remote_room: &str,
) -> Result<()>
pub fn grant( &self, bridge: &str, room_id: &str, remote_room: &str, ) -> Result<()>
The user opts room_id in and links it to remote_room. Explicit, per room, per bridge.
Sourcepub fn revoke(&self, bridge: &str, room_id: &str) -> Result<bool>
pub fn revoke(&self, bridge: &str, room_id: &str) -> Result<bool>
Opts out; nothing of the room is bridged from this moment.
pub fn remote_of(&self, bridge: &str, room_id: &str) -> Result<Option<String>>
pub fn local_of( &self, bridge: &str, remote_room: &str, ) -> Result<Option<String>>
pub fn rooms(&self, bridge: &str) -> Result<BTreeSet<String>>
Auto Trait Implementations§
impl !RefUnwindSafe for ConsentStore
impl !UnwindSafe for ConsentStore
impl Freeze for ConsentStore
impl Send for ConsentStore
impl Sync for ConsentStore
impl Unpin for ConsentStore
impl UnsafeUnpin for ConsentStore
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