[][src]Struct koibumi_box_sync::Manager

pub struct Manager { /* fields omitted */ }

An inbox/outbox manager.

Implementations

impl Manager[src]

pub fn new(conn: Connection) -> Result<Manager, Error>[src]

Constructs an inbox/outbox manager from database connection pool.

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

Retrieves a user object specified by its ID.

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

Inserts a user object.

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

Insert a subscription address for a user.

pub 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 fn insert_msg(
    &self,
    user_id: Vec<u8>,
    identity: &PrivateIdentity,
    object: Object
) -> Result<Message, Error>
[src]

Inserts a msg object.

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

Inserts a broadcast object.

pub 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.

pub fn set_read(
    &self,
    user_id: &[u8],
    hash: &InvHash,
    read: bool
) -> Result<(), Error>
[src]

Sets the read flag of the message specified by a user ID and an inventory hash.

pub fn add_private_identity(
    &self,
    user_id: &[u8],
    identity: PrivateIdentity
) -> Result<(), Error>
[src]

Adds private identity in database.

pub fn add_contact(
    &self,
    user_id: &[u8],
    contact: &Contact
) -> Result<(), Error>
[src]

Insert a contact address for a user.

pub fn add_alias(
    &self,
    user_id: &[u8],
    address: &Address,
    alias: &str
) -> Result<(), Error>
[src]

Insert an alias.

Trait Implementations

impl Debug for Manager[src]

Auto Trait Implementations

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>,