pub struct Register { /* private fields */ }
Expand description
Object storing the Register
Implementations
pub fn new_public(
authority: User,
name: XorName,
tag: u64,
policy: Option<PublicPolicy>,
cap: u16
) -> Self
pub fn new_public(
authority: User,
name: XorName,
tag: u64,
policy: Option<PublicPolicy>,
cap: u16
) -> Self
Construct a new Public Register. The ‘authority’ is assumed to be the PK which the messages were and will be signed with. If a policy is not provided, a default policy will be set where the ‘authority’ is the owner along with an empty users permissions set.
pub fn new_private(
authority: User,
name: XorName,
tag: u64,
policy: Option<PrivatePolicy>,
cap: u16
) -> Self
pub fn new_private(
authority: User,
name: XorName,
tag: u64,
policy: Option<PrivatePolicy>,
cap: u16
) -> Self
Construct a new Private Register. The ‘authority’ is assumed to be the PK which the messages were and will be signed with. If a policy is not provided, a default policy will be set where the ‘authority’ is the owner along with an empty users permissions set.
Return true
if private.
Return the PK which the messages are expected to be signed with by this replica.
Return a value corresponding to the provided ‘hash’, if present.
Read the last entry, or entries when there are branches, if the register is not empty.
Return user permissions, if applicable.
Increment the size cap of the register, returning the previous value.
Write an entry to the Register, returning the generated unsigned CRDT operation so the caller can sign and broadcast it to other replicas, along with the hash of the entry just written.
Apply a signed data CRDT operation.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
type Error = TryFromError
type Error = TryFromError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Register
impl UnwindSafe for Register
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more