[][src]Struct koibumi_box::Manager

pub struct Manager { /* fields omitted */ }

An inbox/outbox manager.

Implementations

impl Manager[src]

pub async fn new(pool: SqlitePool) -> Result<Manager, Error>[src]

Constructs an inbox/outbox manager from database connection pool.

pub async fn user<'_, '_>(&'_ self, id: &'_ [u8]) -> Result<User, Error>[src]

Retrieves a user object specified by its ID.

pub async fn add_user<'_, '_, '_>(
    &'_ self,
    id: &'_ [u8],
    name: &'_ str
) -> Result<(), Error>
[src]

Inserts a user object.

pub async fn subscribe<'_, '_, '_, '_>(
    &'_ self,
    user_id: &'_ [u8],
    address: &'_ Address,
    name: &'_ str
) -> Result<(), Error>
[src]

Insert a subscription address for a user.

pub async fn get_message<'_, '_, '_>(
    &'_ self,
    user_id: &'_ [u8],
    hash: &'_ InvHash
) -> Result<Option<Message>, Error>
[src]

Retrieves a message specified by a user ID and an inventory hash.

pub async fn insert_broadcast<'_>(
    &'_ self,
    user_id: Vec<u8>,
    address: Address,
    object: Object
) -> Result<Message, Error>
[src]

Inserts a broadcast object.

pub async fn message_list<'_, '_>(
    &'_ self,
    user_id: &'_ [u8]
) -> Result<Vec<MessageEntry>, Error>
[src]

Retrieves a list of message entries for a user specified by a user ID.

Trait Implementations

impl Debug for Manager[src]

Auto Trait Implementations

impl !RefUnwindSafe for Manager

impl Send for Manager

impl Sync for Manager

impl Unpin for Manager

impl !UnwindSafe for Manager

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,