Struct ruma_client_api::read_marker::set_read_marker::v3::Request
source · [−]pub struct Request<'a> {
pub room_id: &'a RoomId,
pub fully_read: Option<&'a EventId>,
pub read_receipt: Option<&'a EventId>,
pub private_read_receipt: Option<&'a EventId>,
}
Available on crate features
client
or server
only.Expand description
Data for a request to the set_read_marker
API endpoint.
Sets the position of the read marker for a given room, and optionally the read receipt’s location.
Fields
room_id: &'a RoomId
The room ID to set the read marker in for the user.
fully_read: Option<&'a EventId>
Available on crate feature
unstable-msc2285
only.The event ID the fully-read marker should be located at.
The event MUST belong to the room.
This is equivalent to calling the create_receipt
endpoint with a
ReceiptType::FullyRead
.
Without the unstable-msc2285
feature, this field is required.
read_receipt: Option<&'a EventId>
The event ID to set the public read receipt location at.
This is equivalent to calling the create_receipt
endpoint with a
ReceiptType::Read
.
private_read_receipt: Option<&'a EventId>
Available on crate feature
unstable-msc2285
only.The event ID to set the private read receipt location at.
This is equivalent to calling the create_receipt
endpoint with a
ReceiptType::ReadPrivate
.
Implementations
Trait Implementations
sourceimpl<'a> OutgoingRequest for Request<'a>
Available on crate feature client
only.
impl<'a> OutgoingRequest for Request<'a>
Available on crate feature
client
only.type EndpointError = Error
type EndpointError = Error
A type capturing the expected error conditions the server can return.
type IncomingResponse = Response
type IncomingResponse = Response
Response type returned when the request is successful.
sourcefn try_into_http_request<T: Default + BufMut>(
self,
base_url: &str,
access_token: SendAccessToken<'_>,
considering_versions: &[MatrixVersion]
) -> Result<Request<T>, IntoHttpError>
fn try_into_http_request<T: Default + BufMut>(
self,
base_url: &str,
access_token: SendAccessToken<'_>,
considering_versions: &[MatrixVersion]
) -> Result<Request<T>, IntoHttpError>
Tries to convert this request into an
http::Request
. Read moreAuto Trait Implementations
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> UnwindSafe for Request<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> OutgoingRequestAppserviceExt for Twhere
T: OutgoingRequest,
impl<T> OutgoingRequestAppserviceExt for Twhere
T: OutgoingRequest,
sourcefn try_into_http_request_with_user_id<T>(
self,
base_url: &str,
access_token: SendAccessToken<'_>,
user_id: &UserId,
considering_versions: &[MatrixVersion]
) -> Result<Request<T>, IntoHttpError>where
T: Default + BufMut,
fn try_into_http_request_with_user_id<T>(
self,
base_url: &str,
access_token: SendAccessToken<'_>,
user_id: &UserId,
considering_versions: &[MatrixVersion]
) -> Result<Request<T>, IntoHttpError>where
T: Default + BufMut,
Tries to convert this request into an
http::Request
and appends a virtual user_id
to
assert Appservice identity. Read more