Trait gmime::MultipartExt[][src]

pub trait MultipartExt {
    fn add<P: IsA<Object>>(&self, part: &P);
fn clear(&self);
fn contains<P: IsA<Object>>(&self, part: &P) -> bool;
fn get_boundary(&self) -> Option<String>;
fn get_count(&self) -> i32;
fn get_epilogue(&self) -> Option<String>;
fn get_part(&self, index: i32) -> Option<Object>;
fn get_prologue(&self) -> Option<String>;
fn get_subpart_from_content_id(&self, content_id: &str) -> Option<Object>;
fn index_of<P: IsA<Object>>(&self, part: &P) -> i32;
fn insert<P: IsA<Object>>(&self, index: i32, part: &P);
fn remove<P: IsA<Object>>(&self, part: &P) -> bool;
fn remove_at(&self, index: i32) -> Option<Object>;
fn replace<P: IsA<Object>>(
        &self,
        index: i32,
        replacement: &P
    ) -> Option<Object>;
fn set_boundary(&self, boundary: &str);
fn set_epilogue(&self, epilogue: &str);
fn set_prologue(&self, prologue: &str); }
[]

Trait containing all Multipart methods.

Implementors

MultipartEncrypted, MultipartSigned, Multipart

Required Methods

[]

Appends a mime part to self.

part

a Object

[]

Removes all subparts from self.

[]

Checks if part is contained within self.

part

a Object

Returns

true if part is a subpart of self or false otherwise.

[]

Gets the boundary on the multipart. If the internal boundary is None, then an auto-generated boundary will be set on the multipart and returned.

Returns

the boundary on the multipart.

[]

Gets the number of parts contained within self.

Returns

the number of parts contained within self.

[]

Gets the epilogue on the multipart.

Returns

a pointer to the epilogue string on the multipart.

[]

Gets the part at the specified index within the multipart.

index

the 0-based index of the part

Returns

the part at position index.

[]

Gets the prologue on the multipart.

Returns

a pointer to the prologue string on the multipart.

[]

Gets the mime part with the content-id content_id from the multipart self.

content_id

the content id of the part to look for

Returns

the Object whose content-id matches the search string, or None if a match cannot be found.

[]

Gets the 0-based index of part within self.

part

a Object

Returns

the 0-based index of part within self or %-1 if not found.

[]

Inserts part into self at the specified index.

index

the 0-based index to insert the part

part

a Object

[]

Removes the specified part from self.

part

a Object

Returns

true if the part was removed or false otherwise.

[]

Removes the part at the specified index from self.

index

the 0-based index of the part to remove

Returns

the mime part that was removed or None if the part was not contained within the multipart.

[]

Replaces the part at the specified index within self with replacement.

index

the 0-based index of the part to replace

replacement

a Object to use as the replacement

Returns

the part that was replaced or None if the part was not contained within the multipart.

[]

Sets boundary as the boundary on the multipart. If boundary is None, then a boundary will be auto-generated for you.

boundary

boundary or None to autogenerate one

[]

Sets the epilogue on the multipart.

epilogue

epilogue

[]

Sets the prologue on the multipart.

prologue

prologue

Implementors