Trait fractal::components::pill::source::PillSourceExt
source · pub trait PillSourceExt: 'static {
// Required methods
fn identifier(&self) -> String;
fn display_name(&self) -> String;
fn set_display_name(&self, display_name: String);
fn is_name_ambiguous(&self) -> bool;
fn set_is_name_ambiguous(&self, is_ambiguous: bool);
fn disambiguated_name(&self) -> String;
fn avatar_data(&self) -> AvatarData;
fn connect_display_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId;
fn connect_disambiguated_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId;
fn to_pill(&self) -> Pill;
}
Expand description
Public trait containing implemented methods for everything that derives from
PillSource
.
To override the behavior of these methods, override the corresponding method
of PillSourceImpl
.
Required Methods§
sourcefn identifier(&self) -> String
fn identifier(&self) -> String
A unique identifier for this source.
sourcefn display_name(&self) -> String
fn display_name(&self) -> String
The display name of this source.
sourcefn set_display_name(&self, display_name: String)
fn set_display_name(&self, display_name: String)
Set the display name of this source.
sourcefn is_name_ambiguous(&self) -> bool
fn is_name_ambiguous(&self) -> bool
Whether the display name of this source is ambiguous.
sourcefn set_is_name_ambiguous(&self, is_ambiguous: bool)
fn set_is_name_ambiguous(&self, is_ambiguous: bool)
Set whether the display name of this source is ambiguous.
sourcefn disambiguated_name(&self) -> String
fn disambiguated_name(&self) -> String
The disambiguated display name of this source.
This is the name to display in case the identifier does not appear next to it.
sourcefn avatar_data(&self) -> AvatarData
fn avatar_data(&self) -> AvatarData
The avatar data of this source.
sourcefn connect_display_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_display_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Connect to the signal emitted when the display name changes.
sourcefn connect_disambiguated_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_disambiguated_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Connect to the signal emitted when the disambiguated name changes.
Object Safety§
This trait is not object safe.