pub struct Bridge { /* private fields */ }Implementations§
Source§impl Bridge
impl Bridge
pub async fn build( settings: &Config, password: &str, password_sink: &str, sink_api_key: &str, graceful_token: Option<CancellationToken>, crash_token: Option<CancellationToken>, ) -> Result<(Self, Vec<JoinHandle<()>>), BridgeError>
pub const fn graceful_token(&self) -> &CancellationToken
pub const fn crash_token(&self) -> &CancellationToken
pub fn registry(&self) -> Arc<Mutex<Registry>>
pub fn get_peer_id(&self) -> &str
pub fn get_public_key(&self) -> &str
pub fn get_config(&self) -> Config
pub async fn get_network_state( &self, ) -> Result<MonitorNetworkState, BridgeError>
pub async fn get_requests_in_manager( &self, ) -> Result<RequestsInManager, BridgeError>
pub async fn get_requests_in_manager_subject_id( &self, subject_id: String, ) -> Result<RequestsInManagerSubject, BridgeError>
pub async fn post_event_request( &self, request: BridgeSignedEventRequest, ) -> Result<RequestDataRes, BridgeError>
pub async fn get_approval( &self, subject_id: String, state: Option<ApprovalState>, ) -> Result<Option<ApprovalEntry>, BridgeError>
pub async fn get_approvals( &self, state: Option<ApprovalState>, ) -> Result<Vec<ApprovalEntry>, BridgeError>
pub async fn patch_approve( &self, subject_id: String, state: ApprovalStateRes, ) -> Result<String, BridgeError>
pub async fn post_manual_request_abort( &self, subject_id: String, ) -> Result<String, BridgeError>
pub async fn get_request_state( &self, request_id: String, ) -> Result<RequestInfo, BridgeError>
pub async fn get_all_request_state( &self, ) -> Result<Vec<RequestInfoExtend>, BridgeError>
pub async fn get_pending_transfers( &self, ) -> Result<Vec<TransferSubject>, BridgeError>
pub async fn put_auth_subject( &self, subject_id: String, witnesses: Vec<String>, ) -> Result<String, BridgeError>
pub async fn get_all_auth_subjects(&self) -> Result<Vec<String>, BridgeError>
pub async fn get_witnesses_subject( &self, subject_id: String, ) -> Result<HashSet<String>, BridgeError>
pub async fn delete_auth_subject( &self, subject_id: String, ) -> Result<String, BridgeError>
pub async fn post_update_subject( &self, subject_id: String, query: UpdateSubjectQuery, ) -> Result<String, BridgeError>
pub async fn delete_subject( &self, subject_id: String, ) -> Result<String, BridgeError>
pub async fn post_manual_distribution( &self, subject_id: String, ) -> Result<String, BridgeError>
pub async fn get_all_govs( &self, active: Option<bool>, ) -> Result<Vec<GovsData>, BridgeError>
pub async fn get_all_subjs( &self, governance_id: String, active: Option<bool>, schema_id: Option<String>, ) -> Result<Vec<SubjsData>, BridgeError>
pub async fn get_events( &self, subject_id: String, query: EventsQuery, ) -> Result<PaginatorEvents, BridgeError>
pub async fn get_sink_events( &self, subject_id: String, query: SinkEventsQuery, ) -> Result<SinkEventsPage, BridgeError>
pub async fn get_aborts( &self, subject_id: String, query: AbortsQuery, ) -> Result<PaginatorAborts, BridgeError>
pub async fn get_event_sn( &self, subject_id: String, sn: u64, ) -> Result<LedgerDB, BridgeError>
pub async fn get_first_or_end_events( &self, subject_id: String, quantity: Option<u64>, reverse: Option<bool>, event_type: Option<EventRequestType>, ) -> Result<Vec<LedgerDB>, BridgeError>
pub async fn get_subject_state( &self, subject_id: String, ) -> Result<SubjectDB, BridgeError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bridge
impl !RefUnwindSafe for Bridge
impl Send for Bridge
impl Sync for Bridge
impl Unpin for Bridge
impl UnsafeUnpin for Bridge
impl !UnwindSafe for Bridge
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more