pub struct ChatLayoutProps {Show 17 fields
pub room_name: String,
pub nickname: String,
pub messages: Vec<ChatMessage>,
pub is_online: bool,
pub stats: Option<Box<ConnectionStats>>,
pub system_messages: Vec<String>,
pub error_messages: Vec<String>,
pub show_stats: bool,
pub sidebar_open: bool,
pub sidebar_collapsed: bool,
pub on_send_message: EventHandler<String>,
pub on_set_nickname: EventHandler<String>,
pub on_dial_peer: EventHandler<String>,
pub on_leave_room: EventHandler<()>,
pub on_toggle_stats: EventHandler<()>,
pub on_toggle_sidebar: EventHandler<()>,
pub on_close_sidebar: EventHandler<()>,
}Expand description
Properties for the ChatLayout component.
Fields§
§room_name: String§nickname: String§messages: Vec<ChatMessage>§is_online: bool§stats: Option<Box<ConnectionStats>>§system_messages: Vec<String>§error_messages: Vec<String>§show_stats: bool§on_send_message: EventHandler<String>§on_set_nickname: EventHandler<String>§on_dial_peer: EventHandler<String>§on_leave_room: EventHandler<()>§on_toggle_stats: EventHandler<()>Implementations§
Source§impl ChatLayoutProps
impl ChatLayoutProps
Sourcepub fn builder() -> ChatLayoutPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> ChatLayoutPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building ChatLayoutProps.
On the builder, call .room_name(...), .nickname(...), .messages(...), .is_online(...), .stats(...)(optional), .system_messages(...), .error_messages(...), .show_stats(...), .sidebar_open(...), .sidebar_collapsed(...), .on_send_message(...), .on_set_nickname(...), .on_dial_peer(...), .on_leave_room(...), .on_toggle_stats(...), .on_toggle_sidebar(...), .on_close_sidebar(...) to set the values of the fields.
Finally, call .build() to create the instance of ChatLayoutProps.
Trait Implementations§
Source§impl Clone for ChatLayoutProps
impl Clone for ChatLayoutProps
Source§impl PartialEq for ChatLayoutProps
impl PartialEq for ChatLayoutProps
Source§impl Properties for ChatLayoutPropswhere
Self: Clone,
impl Properties for ChatLayoutPropswhere
Self: Clone,
Source§type Builder = ChatLayoutPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = ChatLayoutPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
The type of the builder for this component.
Used to create “in-progress” versions of the props.
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Make the old props equal to the new props. Return if the props were equal and should be memoized.
§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
Create a component from the props.
Auto Trait Implementations§
impl Freeze for ChatLayoutProps
impl !RefUnwindSafe for ChatLayoutProps
impl !Send for ChatLayoutProps
impl !Sync for ChatLayoutProps
impl Unpin for ChatLayoutProps
impl !UnwindSafe for ChatLayoutProps
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,
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.