Struct zbus::MessageBuilder [−][src]
pub struct MessageBuilder<'a> { /* fields omitted */ }
Expand description
A builder for Message
Implementations
pub fn method_call<'p: 'a, 'm: 'a, P, M>(
path: P,
method_name: M
) -> Result<Self> where
P: TryInto<ObjectPath<'p>>,
M: TryInto<MemberName<'m>>,
P::Error: Into<Error>,
M::Error: Into<Error>,
pub fn method_call<'p: 'a, 'm: 'a, P, M>(
path: P,
method_name: M
) -> Result<Self> where
P: TryInto<ObjectPath<'p>>,
M: TryInto<MemberName<'m>>,
P::Error: Into<Error>,
M::Error: Into<Error>,
Create a message of type MessageType::MethodCall
.
Create a message of type MessageType::Signal
.
Create a message of type MessageType::MethodReturn
.
Create a message of type MessageType::Error
.
Add flags to the message.
See MessageFlags
documentation for the meaning of the flags.
The function will return an error if invalid flags are given for the message type.
Set the unique name of the sending connection.
Set the object to send a call to, or the object a signal is emitted from.
Set the interface to invoke a method call on, or that a signal is emitted from.
Set the member, either the method name or signal name.
Set the name of the connection this message is intended for.
Build the Message
with the given body.
You may pass ()
as the body if the message has no body.
The caller is currently required to ensure that the resulting message contains the headers as compliant with the specification. Additional checks may be added to this builder over time as needed.