pub struct SegmentBuilder { /* private fields */ }Implementations§
Source§impl SegmentBuilder
impl SegmentBuilder
pub fn new() -> Self
pub fn build(self) -> Vec<SendSegment>
pub fn push(&mut self, segment: impl SendSegmentData)
pub fn and_push(self, segment: impl SendSegmentData) -> Self
pub fn text(self, text: impl ToString) -> Self
pub fn face(self, id: impl ToString) -> Self
pub fn image_with_options( self, file: impl ToString, image_type: Option<ImageType>, cache: Option<bool>, proxy: Option<bool>, timeout: Option<i32>, ) -> Self
pub fn image(self, file: impl ToString) -> Self
pub fn image_builder(self, file: impl ToString) -> ImageDataBuilder
pub fn record_with_options( self, file: impl ToString, magic: Option<String>, cache: Option<bool>, proxy: Option<bool>, timeout: Option<i32>, ) -> Self
pub fn record(self, file: impl ToString) -> Self
pub fn video_with_options( self, file: impl ToString, cache: Option<bool>, proxy: Option<bool>, timeout: Option<i32>, ) -> Self
pub fn video(self, file: impl ToString) -> Self
pub fn at(self, qq: AtType) -> Self
pub fn at_all(self) -> Self
pub fn at_id(self, id: String) -> Self
pub fn rps(self) -> Self
pub fn dice(self) -> Self
pub fn shake(self) -> Self
pub fn poke(self, poke_type: impl ToString, id: impl ToString) -> Self
pub fn anonymous(self, ignore: Option<bool>) -> Self
pub fn contact(self, contact_type: ContactType, id: impl ToString) -> Self
pub fn contact_qq(self, id: impl ToString) -> Self
pub fn contact_group(self, id: impl ToString) -> Self
pub fn location( self, lat: impl ToString, lon: impl ToString, title: Option<String>, content: Option<String>, ) -> Self
pub fn music( self, music_type: MusicType, id: Option<String>, url: Option<String>, audio: Option<String>, title: Option<String>, content: Option<String>, image: Option<String>, ) -> Self
pub fn music_typed(self, music_type: MusicType, id: impl ToString) -> Self
pub fn music_qq(self, id: impl ToString) -> Self
pub fn music_163(self, id: impl ToString) -> Self
pub fn music_xm(self, id: impl ToString) -> Self
pub fn music_custom( self, url: impl ToString, audio: impl ToString, title: impl ToString, content: impl ToString, image: impl ToString, ) -> Self
pub fn reply(self, id: impl ToString) -> Self
pub fn forward(self) -> Self
pub fn node( self, id: Option<String>, user_id: Option<String>, nickname: Option<String>, content: Option<Vec<SendSegment>>, ) -> Self
pub fn node_forward(self, id: impl ToString) -> Self
pub fn node_custom( self, user_id: impl ToString, nickname: impl ToString, content: Vec<SendSegment>, ) -> Self
pub fn xml(self, data: impl ToString) -> Self
pub fn json(self, data: impl ToString) -> Self
Trait Implementations§
Source§impl Clone for SegmentBuilder
impl Clone for SegmentBuilder
Source§fn clone(&self) -> SegmentBuilder
fn clone(&self) -> SegmentBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SegmentBuilder
impl Debug for SegmentBuilder
Source§impl Default for SegmentBuilder
impl Default for SegmentBuilder
Source§fn default() -> SegmentBuilder
fn default() -> SegmentBuilder
Returns the “default value” for a type. Read more
Source§impl From<Vec<SendSegment>> for SegmentBuilder
impl From<Vec<SendSegment>> for SegmentBuilder
Source§fn from(value: Vec<SendSegment>) -> Self
fn from(value: Vec<SendSegment>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SegmentBuilder
impl RefUnwindSafe for SegmentBuilder
impl Send for SegmentBuilder
impl Sync for SegmentBuilder
impl Unpin for SegmentBuilder
impl UnsafeUnpin for SegmentBuilder
impl UnwindSafe for SegmentBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more