Struct leptos_use::UseBroadcastChannelReturn
source · pub struct UseBroadcastChannelReturn<T, PFn, CFn, E, D>{
pub is_supported: Signal<bool>,
pub channel: Signal<Option<BroadcastChannel>>,
pub message: Signal<Option<T>>,
pub post: PFn,
pub close: CFn,
pub error: Signal<Option<UseBroadcastChannelError<E, D>>>,
pub is_closed: Signal<bool>,
}
Expand description
Return type of use_broadcast_channel
.
Fields§
§is_supported: Signal<bool>
true
if this browser supports BroadcastChannel
s.
channel: Signal<Option<BroadcastChannel>>
The broadcast channel that is wrapped by this function
message: Signal<Option<T>>
Latest message received from the channel
post: PFn
Sends a message through the channel
close: CFn
Closes the channel
error: Signal<Option<UseBroadcastChannelError<E, D>>>
Latest error as reported by the messageerror
event.
is_closed: Signal<bool>
Wether the channel is closed
Auto Trait Implementations§
impl<T, PFn, CFn, E, D> Freeze for UseBroadcastChannelReturn<T, PFn, CFn, E, D>
impl<T, PFn, CFn, E, D> !RefUnwindSafe for UseBroadcastChannelReturn<T, PFn, CFn, E, D>
impl<T, PFn, CFn, E, D> !Send for UseBroadcastChannelReturn<T, PFn, CFn, E, D>
impl<T, PFn, CFn, E, D> !Sync for UseBroadcastChannelReturn<T, PFn, CFn, E, D>
impl<T, PFn, CFn, E, D> Unpin for UseBroadcastChannelReturn<T, PFn, CFn, E, D>
impl<T, PFn, CFn, E, D> !UnwindSafe for UseBroadcastChannelReturn<T, PFn, CFn, E, D>
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