pub struct RealmFilter(/* private fields */);Expand description
Represents a legacy property for linkifiers.
Present if realm_filters is present in fetch_event_types.
When present, this is always an empty array.
Changes: Prior to Zulip 7.0 (feature level 176), this was
an array of tuples, where each tuple described a linkifier. The first
element of the tuple was a string regex pattern which represented the
pattern to be linkified on matching, for example "#(?P<id>[123])".
The second element was a URL format string that the pattern should be
linkified with. A URL format string for the above example would be
"https://realm.com/my_realm_filter/%(id)s". And the third element
was the ID of the realm filter.
Deprecated in Zulip 4.0 (feature level 54), replaced by the
realm_linkifiers key.
Modified from openapi-generator-cli output:
$ openapi-generator-cli generate -g rust -i ./zerver/openapi/zulip.yaml -o zulip-openapi --skip-validate-spec/*
* Zulip REST API
*
* Powerful open source group chat
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/See zerver/openapi/zulip.yaml for the original OpenAPI configuration.
Configuration slightly modified to work with the Rust generator of openapi-generator-cli.
Implementations§
Source§impl RealmFilter
impl RealmFilter
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new RealmFilter.
Sourcepub fn linkified_regex(&self) -> &str
pub fn linkified_regex(&self) -> &str
Gets the regex pattern which represented the pattern to be linkified on matching, for example "#(?P<id>[123])".
Sourcepub fn set_linkified_regex(&mut self, val: String)
pub fn set_linkified_regex(&mut self, val: String)
Sets the regex pattern which represented the pattern to be linkified on matching, for example "#(?P<id>[123])".
Sourcepub fn with_linkified_regex(self, val: String) -> Self
pub fn with_linkified_regex(self, val: String) -> Self
Builder function that sets the regex pattern which represented the pattern to be linkified on matching, for example "#(?P<id>[123])".
Sourcepub fn url_format(&self) -> &str
pub fn url_format(&self) -> &str
Gets the URL format string that the pattern should be linkified with.
A URL format string for the above example would be "https://realm.com/my_realm_filter/%(id)s".
Sourcepub fn set_url_format(&mut self, val: String)
pub fn set_url_format(&mut self, val: String)
Sets the URL format string that the pattern should be linkified with.
A URL format string for the above example would be "https://realm.com/my_realm_filter/%(id)s".
Sourcepub fn with_url_format(self, val: String) -> Self
pub fn with_url_format(self, val: String) -> Self
Builder function that sets the URL format string that the pattern should be linkified with.
A URL format string for the above example would be "https://realm.com/my_realm_filter/%(id)s".