[−][src]Struct koibumi_box_sync::Manager
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]
&self,
user_id: &[u8],
hash: &InvHash
) -> Result<Option<Message>, Error>
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]
&self,
user_id: Vec<u8>,
identity: &PrivateIdentity,
object: Object
) -> Result<Message, Error>
Inserts a msg object.
pub fn insert_broadcast(
&self,
user_id: Vec<u8>,
address: Address,
object: Object
) -> Result<Message, Error>
[src]
&self,
user_id: Vec<u8>,
address: Address,
object: Object
) -> Result<Message, Error>
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]
&self,
user_id: &[u8],
hash: &InvHash,
read: bool
) -> Result<(), Error>
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]
&self,
user_id: &[u8],
identity: PrivateIdentity
) -> Result<(), Error>
Adds private identity in database.
pub fn add_contact(
&self,
user_id: &[u8],
contact: &Contact
) -> Result<(), Error>
[src]
&self,
user_id: &[u8],
contact: &Contact
) -> Result<(), Error>
Insert a contact address for a user.
pub fn add_alias(
&self,
user_id: &[u8],
address: &Address,
alias: &str
) -> Result<(), Error>
[src]
&self,
user_id: &[u8],
address: &Address,
alias: &str
) -> Result<(), Error>
Insert an alias.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Manager
[src]
impl Send for Manager
[src]
impl !Sync for Manager
[src]
impl Unpin for Manager
[src]
impl !UnwindSafe for Manager
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,