pub struct DirectoryRoots { /* private fields */ }Expand description
Reconciles Kennedy-owned Kmap roots into Telegram’s identity directory.
Implementations§
Source§impl DirectoryRoots
impl DirectoryRoots
Sourcepub fn new(
kmap: KwebManager,
directory: Arc<Directory>,
web_user_handle: impl Into<String>,
system_user_root: NodeId,
writer: Arc<Mutex<()>>,
) -> Self
pub fn new( kmap: KwebManager, directory: Arc<Directory>, web_user_handle: impl Into<String>, system_user_root: NodeId, writer: Arc<Mutex<()>>, ) -> Self
Constructs root reconciliation over the application’s existing owners and shared global writer lane.
Sourcepub async fn reconcile_pending(&self) -> Result<()>
pub async fn reconcile_pending(&self) -> Result<()>
Completes every currently pending user and group root assignment.
Sourcepub async fn ensure_user(&self, telegram_user_id: i64) -> Result<User>
pub async fn ensure_user(&self, telegram_user_id: i64) -> Result<User>
Returns a ready Telegram user, creating and assigning its root when necessary.
Sourcepub async fn ensure_group(&self, group_id: &str) -> Result<Group>
pub async fn ensure_group(&self, group_id: &str) -> Result<Group>
Returns a ready Telegram group, creating and assigning its root when necessary.
Trait Implementations§
Source§impl Clone for DirectoryRoots
impl Clone for DirectoryRoots
Source§fn clone(&self) -> DirectoryRoots
fn clone(&self) -> DirectoryRoots
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for DirectoryRoots
impl !UnwindSafe for DirectoryRoots
impl Freeze for DirectoryRoots
impl Send for DirectoryRoots
impl Sync for DirectoryRoots
impl Unpin for DirectoryRoots
impl UnsafeUnpin for DirectoryRoots
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more