Struct sourceview5::FileSaver[][src]

pub struct FileSaver(_);

Implementations

impl FileSaver[src]

pub fn new<P: IsA<Buffer>, Q: IsA<File>>(buffer: &P, file: &Q) -> FileSaver[src]

Creates a new FileSaver object. The buffer will be saved to the File’s location.

This constructor is suitable for a simple “save” operation, when the file already contains a non-None File:location.

buffer

the Buffer to save.

file

the File.

Returns

a new FileSaver object.

pub fn with_target<P: IsA<Buffer>, Q: IsA<File>, R: IsA<File>>(
    buffer: &P,
    file: &Q,
    target_location: &R
) -> FileSaver
[src]

pub fn get_buffer(&self) -> Option<Buffer>[src]

Returns

the Buffer to save.

pub fn get_compression_type(&self) -> CompressionType[src]

Returns

the compression type.

pub fn get_encoding(&self) -> Option<Encoding>[src]

Returns

the encoding.

pub fn get_file(&self) -> Option<File>[src]

Returns

the File.

pub fn get_flags(&self) -> FileSaverFlags[src]

Returns

the flags.

pub fn get_location(&self) -> Option<File>[src]

Returns

the gio::File where to save the buffer to.

pub fn get_newline_type(&self) -> NewlineType[src]

Returns

the newline type.

pub fn set_compression_type(&self, compression_type: CompressionType)[src]

Sets the compression type. By default the compression type is taken from the File.

compression_type

the new compression type.

pub fn set_encoding(&self, encoding: Option<&Encoding>)[src]

Sets the encoding. If encoding is None, the UTF-8 encoding will be set. By default the encoding is taken from the File.

encoding

the new encoding, or None for UTF-8.

pub fn set_flags(&self, flags: FileSaverFlags)[src]

flags

the new flags.

pub fn set_newline_type(&self, newline_type: NewlineType)[src]

Sets the newline type. By default the newline type is taken from the File.

newline_type

the new newline type.

pub fn connect_property_compression_type_notify<F: Fn(&FileSaver) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_encoding_notify<F: Fn(&FileSaver) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_flags_notify<F: Fn(&FileSaver) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_newline_type_notify<F: Fn(&FileSaver) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Trait Implementations

impl Clone for FileSaver[src]

impl Debug for FileSaver[src]

impl Display for FileSaver[src]

impl Eq for FileSaver[src]

impl Hash for FileSaver[src]

impl Ord for FileSaver[src]

impl ParentClassIs for FileSaver[src]

type Parent = Object

impl<T: ObjectType> PartialEq<T> for FileSaver[src]

impl<T: ObjectType> PartialOrd<T> for FileSaver[src]

impl StaticType for FileSaver[src]

impl StructuralEq for FileSaver[src]

Auto Trait Implementations

impl RefUnwindSafe for FileSaver

impl !Send for FileSaver

impl !Sync for FileSaver

impl Unpin for FileSaver

impl UnwindSafe for FileSaver

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.