pub struct PinWeaverSynchronousProxy { /* private fields */ }
Implementations§
Source§impl PinWeaverSynchronousProxy
impl PinWeaverSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<PinWeaverEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<PinWeaverEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_version(&self, ___deadline: MonotonicInstant) -> Result<u8, Error>
pub fn get_version(&self, ___deadline: MonotonicInstant) -> Result<u8, Error>
Returns the current protocol version.
Sourcepub fn reset_tree(
&self,
bits_per_level: u8,
height: u8,
___deadline: MonotonicInstant,
) -> Result<PinWeaverResetTreeResult, Error>
pub fn reset_tree( &self, bits_per_level: u8, height: u8, ___deadline: MonotonicInstant, ) -> Result<PinWeaverResetTreeResult, Error>
Creates an empty Merkle tree with bits_per_level
and height
.
On Success
Returns the root_hash
of the empty tree with the given parameters.
Sourcepub fn insert_leaf(
&self,
params: &InsertLeafParams,
___deadline: MonotonicInstant,
) -> Result<PinWeaverInsertLeafResult, Error>
pub fn insert_leaf( &self, params: &InsertLeafParams, ___deadline: MonotonicInstant, ) -> Result<PinWeaverInsertLeafResult, Error>
Inserts a leaf into the Merkle tree.
params
see InsertLeafParams
.
On Success
result
see InsertLeafResponse
.
Sourcepub fn remove_leaf(
&self,
params: &RemoveLeafParams,
___deadline: MonotonicInstant,
) -> Result<PinWeaverRemoveLeafResult, Error>
pub fn remove_leaf( &self, params: &RemoveLeafParams, ___deadline: MonotonicInstant, ) -> Result<PinWeaverRemoveLeafResult, Error>
Removes a leaf from the Merkle tree.
params
see RemoveLeafParams
.
On Success
root_hash
is the updated root hash of the tree.
Sourcepub fn try_auth(
&self,
params: &TryAuthParams,
___deadline: MonotonicInstant,
) -> Result<PinWeaverTryAuthResult, Error>
pub fn try_auth( &self, params: &TryAuthParams, ___deadline: MonotonicInstant, ) -> Result<PinWeaverTryAuthResult, Error>
Attempts to authenticate a leaf of the Merkle tree. On Success: TryAuthSuccess is returned in the union. On Authentication Failure: TryAuthFailed is returned in the union. On Rate Limited Error: TryAuthRateLimited is returned in the union.
Sourcepub fn get_log(
&self,
root_hash: &[u8; 32],
___deadline: MonotonicInstant,
) -> Result<PinWeaverGetLogResult, Error>
pub fn get_log( &self, root_hash: &[u8; 32], ___deadline: MonotonicInstant, ) -> Result<PinWeaverGetLogResult, Error>
Retrieves the set of replay logs starting from the specified root hash. If Found: Returns all log entries including and starting from the operation specified by the root hash parameter. If Not Found: Returns all known log entries.
Sourcepub fn log_replay(
&self,
params: &LogReplayParams,
___deadline: MonotonicInstant,
) -> Result<PinWeaverLogReplayResult, Error>
pub fn log_replay( &self, params: &LogReplayParams, ___deadline: MonotonicInstant, ) -> Result<PinWeaverLogReplayResult, Error>
Applies a TryAuth operation replay log by modifying the credential metadata based on the state of the replay log. This will step forward any credential metadata for the appropriate label, whether or not it matches the exact state in history. On Success: Returns the updated leaf hmac and credential metadata. On Failure: Returns an error.
Trait Implementations§
Source§impl Debug for PinWeaverSynchronousProxy
impl Debug for PinWeaverSynchronousProxy
Source§impl SynchronousProxy for PinWeaverSynchronousProxy
impl SynchronousProxy for PinWeaverSynchronousProxy
Source§type Proxy = PinWeaverProxy
type Proxy = PinWeaverProxy
Source§type Protocol = PinWeaverMarker
type Protocol = PinWeaverMarker
Proxy
controls.