Struct matrix_uri::MatrixUri
source · [−]pub struct MatrixUri {
pub mxid: MatrixId,
pub child_mxid: Option<MatrixId>,
pub routing: Vec<String>,
pub authority: Option<String>,
pub fragment: Option<String>,
/* private fields */
}
Expand description
A Matrix URI
Fields
mxid: MatrixId
Primary MXID
child_mxid: Option<MatrixId>
Secondary, optional, MXID
routing: Vec<String>
Homeserver address order is preserved from URI
“Reserved for future use” according to MSC
fragment: Option<String>
“Reserved for future use” according to MSC
Implementations
sourceimpl MatrixUri
impl MatrixUri
sourcepub fn new(
mxid: MatrixId,
child_mxid: Option<MatrixId>,
query_params: Option<HashMap<String, String>>,
routing: Option<Vec<String>>,
action: Option<MatrixUriAction>
) -> Result<Self, MatrixUriGenError>
pub fn new(
mxid: MatrixId,
child_mxid: Option<MatrixId>,
query_params: Option<HashMap<String, String>>,
routing: Option<Vec<String>>,
action: Option<MatrixUriAction>
) -> Result<Self, MatrixUriGenError>
Builds new Matrix URI
sourcepub fn action(&self) -> Option<MatrixUriAction>
pub fn action(&self) -> Option<MatrixUriAction>
Returns the action
key from query parameters
sourcepub fn query_string(&self) -> String
pub fn query_string(&self) -> String
Constructs a query string from itself
sourcepub fn matrix_to_string(&self) -> String
pub fn matrix_to_string(&self) -> String
Builds a matrix.to
URI
sourcepub fn matrix_uri_string(&self) -> String
pub fn matrix_uri_string(&self) -> String
Builds a URI according to MSC2312 (matrix://
)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MatrixUri
impl Send for MatrixUri
impl Sync for MatrixUri
impl Unpin for MatrixUri
impl UnwindSafe for MatrixUri
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more