StringOutputPort

Struct StringOutputPort 

Source
pub struct StringOutputPort {
    pub header: GcHeader,
    /* private fields */
}

Fields§

§header: GcHeader

Implementations§

Source§

impl StringOutputPort

Source

pub fn new() -> Self

Source

pub fn open(_path: &str) -> Result<StringOutputPort>

Source

pub fn close(&mut self)

Source

pub fn reset(&mut self)

Source

pub fn string(&mut self) -> String

Trait Implementations§

Source§

impl Debug for StringOutputPort

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StringOutputPort

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for StringOutputPort

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl OutputPort for StringOutputPort

Source§

fn flush(&mut self)

Source§

impl Port for StringOutputPort

Source§

fn is_open(&self) -> bool

Source§

fn close(&mut self) -> Result<(), SchemeError>

Source§

fn position(&mut self, _vm: &mut Vm) -> Result<usize, SchemeError>

Source§

fn set_position( &mut self, _vm: &mut Vm, pos: usize, ) -> Result<usize, SchemeError>

Source§

fn has_position(&self) -> bool

Source§

fn has_set_position(&self) -> bool

Source§

fn input_src(&self) -> String

Source§

fn buffer_mode(&self) -> BufferMode

Source§

impl TextOutputPort for StringOutputPort

Source§

fn put_string(&mut self, s: &str) -> Result<(), SchemeError>

Source§

fn write_char(&mut self, c: char) -> Result<(), SchemeError>

Source§

fn write(&mut self, obj: Object, shared_aware: bool) -> Result<(), SchemeError>

Source§

fn display( &mut self, obj: Object, shared_aware: bool, ) -> Result<(), SchemeError>

Source§

fn display_one( &mut self, obj: Object, human_readable: bool, ) -> Result<(), SchemeError>

Source§

fn display_shared_one( &mut self, obj: Object, seen: &mut HashMap<Object, Object>, shared_id: &mut isize, human_readable: bool, ) -> Result<(), SchemeError>

Source§

fn display_abbreviated(&mut self, obj: Object) -> bool

Source§

fn display_pair( &mut self, p: GcRef<Pair>, human_readable: bool, ) -> Result<(), SchemeError>

Source§

fn display_shared_pair( &mut self, p: GcRef<Pair>, seen: &mut HashMap<Object, Object>, shared_id: &mut isize, human_readable: bool, ) -> Result<(), SchemeError>

Source§

fn as_display(&mut self, obj: Object) -> Result<(), SchemeError>

Source§

fn as_write(&mut self, obj: Object) -> Result<(), SchemeError>

Source§

fn display_vector( &mut self, v: GcRef<Vector>, human_readable: bool, ) -> Result<(), SchemeError>

Source§

fn display_shared_vector( &mut self, v: GcRef<Vector>, seen: &mut HashMap<Object, Object>, shared_id: &mut isize, human_readable: bool, ) -> Result<(), SchemeError>

Source§

fn display_struct( &mut self, s: GcRef<SimpleStruct>, human_readable: bool, ) -> Result<(), SchemeError>

Source§

fn display_shared_struct( &mut self, s: GcRef<SimpleStruct>, seen: &mut HashMap<Object, Object>, shared_id: &mut isize, human_readable: bool, ) -> Result<(), SchemeError>

Source§

fn scan(&mut self, obj: Object, seen: &mut HashMap<Object, Object>)

Source§

fn format(&mut self, fmt: &str, args: &mut [Object]) -> Result<(), SchemeError>

Source§

impl Trace for StringOutputPort

Source§

fn trace(&self, _gc: &mut Gc)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.