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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.