pub trait TextTagTableExt: IsA<TextTagTable> + 'static {
// Provided methods
fn add(&self, tag: &impl IsA<TextTag>) -> bool { ... }
fn foreach<P: FnMut(&TextTag)>(&self, func: P) { ... }
fn size(&self) -> i32 { ... }
fn lookup(&self, name: &str) -> Option<TextTag> { ... }
fn remove(&self, tag: &impl IsA<TextTag>) { ... }
fn connect_tag_added<F: Fn(&Self, &TextTag) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_tag_changed<F: Fn(&Self, &TextTag, bool) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_tag_removed<F: Fn(&Self, &TextTag) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Expand description
Provided Methods§
Sourcefn foreach<P: FnMut(&TextTag)>(&self, func: P)
fn foreach<P: FnMut(&TextTag)>(&self, func: P)
Calls func on each tag in self, with user data data.
Note that the table may not be modified while iterating
over it (you can’t add/remove tags).
§func
a function to call on each tag
Sourcefn remove(&self, tag: &impl IsA<TextTag>)
fn remove(&self, tag: &impl IsA<TextTag>)
Remove a tag from the table. If a TextBuffer has self as its tag table,
the tag is removed from the buffer. The table’s reference to the tag is
removed, so the tag will end up destroyed if you don’t have a reference to
it.
§tag
a TextTag
Sourcefn connect_tag_added<F: Fn(&Self, &TextTag) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_tag_added<F: Fn(&Self, &TextTag) + 'static>( &self, f: F, ) -> SignalHandlerId
§tag
the added tag.
Sourcefn connect_tag_changed<F: Fn(&Self, &TextTag, bool) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_tag_changed<F: Fn(&Self, &TextTag, bool) + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_tag_removed<F: Fn(&Self, &TextTag) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_tag_removed<F: Fn(&Self, &TextTag) + 'static>( &self, f: F, ) -> SignalHandlerId
§tag
the removed tag.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".