Struct sourceview5::FileLoader[][src]

pub struct FileLoader(_);

Implementations

impl FileLoader[src]

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

Creates a new FileLoader object. The contents is read from the File’s location. If not already done, call FileExt::set_location before calling this constructor. The previous location is anyway not needed, because as soon as the file loading begins, the buffer is emptied.

buffer

the Buffer to load the contents into.

file

the File.

Returns

a new FileLoader object.

pub fn from_stream<P: IsA<Buffer>, Q: IsA<File>, R: IsA<InputStream>>(
    buffer: &P,
    file: &Q,
    stream: &R
) -> FileLoader
[src]

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

Returns

the Buffer to load the contents into.

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

Returns

the detected compression type.

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

Returns

the detected file encoding.

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

Returns

the File.

pub fn get_input_stream(&self) -> Option<InputStream>[src]

Returns

the gio::InputStream to load, or None if a gio::File is used.

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

Returns

the gio::File to load, or None if an input stream is used.

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

Returns

the detected newline type.

Trait Implementations

impl Clone for FileLoader[src]

impl Debug for FileLoader[src]

impl Display for FileLoader[src]

impl Eq for FileLoader[src]

impl Hash for FileLoader[src]

impl Ord for FileLoader[src]

impl ParentClassIs for FileLoader[src]

type Parent = Object

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

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

impl StaticType for FileLoader[src]

impl StructuralEq for FileLoader[src]

Auto Trait Implementations

impl RefUnwindSafe for FileLoader

impl !Send for FileLoader

impl !Sync for FileLoader

impl Unpin for FileLoader

impl UnwindSafe for FileLoader

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.