pub struct PinWeaverProxy { /* private fields */ }
Implementations§
Source§impl PinWeaverProxy
impl PinWeaverProxy
Sourcepub fn take_event_stream(&self) -> PinWeaverEventStream
pub fn take_event_stream(&self) -> PinWeaverEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_version(&self) -> QueryResponseFut<u8, DefaultFuchsiaResourceDialect>
pub fn get_version(&self) -> QueryResponseFut<u8, DefaultFuchsiaResourceDialect>
Returns the current protocol version.
Sourcepub fn reset_tree(
&self,
bits_per_level: u8,
height: u8,
) -> QueryResponseFut<PinWeaverResetTreeResult, DefaultFuchsiaResourceDialect>
pub fn reset_tree( &self, bits_per_level: u8, height: u8, ) -> QueryResponseFut<PinWeaverResetTreeResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<PinWeaverInsertLeafResult, DefaultFuchsiaResourceDialect>
pub fn insert_leaf( &self, params: &InsertLeafParams, ) -> QueryResponseFut<PinWeaverInsertLeafResult, DefaultFuchsiaResourceDialect>
Inserts a leaf into the Merkle tree.
params
see InsertLeafParams
.
On Success
result
see InsertLeafResponse
.
Sourcepub fn remove_leaf(
&self,
params: &RemoveLeafParams,
) -> QueryResponseFut<PinWeaverRemoveLeafResult, DefaultFuchsiaResourceDialect>
pub fn remove_leaf( &self, params: &RemoveLeafParams, ) -> QueryResponseFut<PinWeaverRemoveLeafResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<PinWeaverTryAuthResult, DefaultFuchsiaResourceDialect>
pub fn try_auth( &self, params: &TryAuthParams, ) -> QueryResponseFut<PinWeaverTryAuthResult, DefaultFuchsiaResourceDialect>
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],
) -> QueryResponseFut<PinWeaverGetLogResult, DefaultFuchsiaResourceDialect>
pub fn get_log( &self, root_hash: &[u8; 32], ) -> QueryResponseFut<PinWeaverGetLogResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<PinWeaverLogReplayResult, DefaultFuchsiaResourceDialect>
pub fn log_replay( &self, params: &LogReplayParams, ) -> QueryResponseFut<PinWeaverLogReplayResult, DefaultFuchsiaResourceDialect>
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 Clone for PinWeaverProxy
impl Clone for PinWeaverProxy
Source§fn clone(&self) -> PinWeaverProxy
fn clone(&self) -> PinWeaverProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PinWeaverProxy
impl Debug for PinWeaverProxy
Source§impl PinWeaverProxyInterface for PinWeaverProxy
impl PinWeaverProxyInterface for PinWeaverProxy
type GetVersionResponseFut = QueryResponseFut<u8>
type ResetTreeResponseFut = QueryResponseFut<Result<[u8; 32], PinWeaverError>>
type InsertLeafResponseFut = QueryResponseFut<Result<InsertLeafResponse, PinWeaverError>>
type RemoveLeafResponseFut = QueryResponseFut<Result<[u8; 32], PinWeaverError>>
type TryAuthResponseFut = QueryResponseFut<Result<TryAuthResponse, PinWeaverError>>
type GetLogResponseFut = QueryResponseFut<Result<Vec<LogEntry>, PinWeaverError>>
type LogReplayResponseFut = QueryResponseFut<Result<LogReplayResponse, PinWeaverError>>
fn get_version(&self) -> Self::GetVersionResponseFut
fn reset_tree( &self, bits_per_level: u8, height: u8, ) -> Self::ResetTreeResponseFut
fn insert_leaf(&self, params: &InsertLeafParams) -> Self::InsertLeafResponseFut
fn remove_leaf(&self, params: &RemoveLeafParams) -> Self::RemoveLeafResponseFut
fn try_auth(&self, params: &TryAuthParams) -> Self::TryAuthResponseFut
fn get_log(&self, root_hash: &[u8; 32]) -> Self::GetLogResponseFut
fn log_replay(&self, params: &LogReplayParams) -> Self::LogReplayResponseFut
Source§impl Proxy for PinWeaverProxy
impl Proxy for PinWeaverProxy
Source§type Protocol = PinWeaverMarker
type Protocol = PinWeaverMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for PinWeaverProxy
impl !RefUnwindSafe for PinWeaverProxy
impl Send for PinWeaverProxy
impl Sync for PinWeaverProxy
impl Unpin for PinWeaverProxy
impl !UnwindSafe for PinWeaverProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)