Skip to main content

ProtocolRegistry

Struct ProtocolRegistry 

Source
pub struct ProtocolRegistry { /* private fields */ }
Expand description

Cross-platform registry managing custom URI protocol handlers and incoming deep links.

Implementations§

Source§

impl ProtocolRegistry

Registration and incoming link queuing for ProtocolRegistry.

Source

pub fn register( &mut self, registration: ProtocolRegistration, platform: PlatformKind, ) -> Result<ProtocolManifestEntry, PlatformError>

Validates and registers registration for platform, returning its OS manifest descriptor.

§Arguments
  • &Self - Mutable protocol registry.
  • ProtocolRegistration - Custom protocol specification.
  • PlatformKind - Active platform kind.
§Returns
  • Result<ProtocolManifestEntry, PlatformError> - Generated platform registration descriptor.
Source

pub fn is_registered(&self, scheme: &str) -> bool

Returns true if scheme has been registered.

§Arguments
  • &Self - Protocol registry reference.
  • &str - Scheme name to check.
§Returns
  • bool - Registration status.
Source

pub fn push_raw_url( &mut self, raw_url: &str, ) -> Result<DeepLinkEvent, PlatformError>

Parses and queues a raw incoming deep link URI.

§Arguments
  • &Self - Mutable protocol registry.
  • &str - Raw incoming URI string.
§Returns
  • Result<DeepLinkEvent, PlatformError> - Parsed deep link event.

Drains all queued deep link events.

§Arguments
  • &Self - Mutable protocol registry.
§Returns
  • Vec<DeepLinkEvent> - Drained deep links in arrival order.
Source§

impl ProtocolRegistry

Source

pub fn get_registrations(&self) -> &Vec<ProtocolRegistration>

Source

pub fn get_mut_registrations(&mut self) -> &mut Vec<ProtocolRegistration>

Source

pub fn set_registrations(&mut self, val: Vec<ProtocolRegistration>) -> &mut Self

Source§

impl ProtocolRegistry

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Clone for ProtocolRegistry

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProtocolRegistry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ProtocolRegistry

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.