pub struct PluginBuilder { /* private fields */ }Implementations§
Source§impl PluginBuilder
impl PluginBuilder
pub fn new() -> Self
pub fn relays(self, urls: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn app_namespace(self, ns: impl Into<String>) -> Self
Sourcepub fn device_id(self, id: impl Into<String>) -> Self
pub fn device_id(self, id: impl Into<String>) -> Self
Override the device identifier stamped on published events.
Defaults to a random UUID generated at process start (ephemeral). Supply a stable, per-device value — e.g. a UUID persisted in the app’s data directory, a hardware serial, or a hash of the machine name — so that consumers can reliably attribute events to a specific device across restarts.
Sourcepub fn max_payload_size(self, bytes: usize) -> Self
pub fn max_payload_size(self, bytes: usize) -> Self
Override the maximum payload size in bytes. Defaults to 64KB. Must not exceed 400KB.
Payloads exceeding this limit return Error::PayloadTooLarge from publish.
Values above 400KB surface as Error::InvalidPayloadLimit at plugin startup.
pub fn build<R: Runtime>(self) -> TauriPlugin<R>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginBuilder
impl RefUnwindSafe for PluginBuilder
impl Send for PluginBuilder
impl Sync for PluginBuilder
impl Unpin for PluginBuilder
impl UnsafeUnpin for PluginBuilder
impl UnwindSafe for PluginBuilder
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> 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